Yeah, that was pretty easy. I don't know why I never thought of it
before... :)

On Fri Dec 05 2014 at 10:15:28 AM Tiffany Grenier <[email protected]>
wrote:

> I would never have thought it was so simple, here!
> That's simply great!!
>
> Le vendredi 5 décembre 2014 16:57:26 UTC+1, Dan a écrit :
>>
>> Yeah, I noticed that too.
>>
>> The reason is [text title 'Tom's friends' required=true] is what's being
>> sent to the forms markup and when it get's parsed by BOLTargs it sees 'Tom'
>> as the first parameter. Onesolution might be to replace ' and " with the
>> html entities so BOLTargs doesn't see them. The other might be to make the
>> BOLTargs function a little smarter so it ignores ' when it is followed by a
>> letter. I'll see what I can figure out.
>>
>> It would be easier to always escape ' and " but I have worked really hard
>> to avoid doing any encoding in text files. Just drop a text file in to your
>> pages folder, and BoltWire can immediately read it just fine. But it does
>> make things tricky. :)
>>
>> Actually--no need to think about it. This is easy. Try changing the first
>> line to the second in library.php around line #2096
>>
>> $d = str_replace('<', '&lt;', $d);
>> $d = str_replace(Array('<', "'", '"'), Array('&lt;', '&apos;', '&quot;'),
>> $d);
>>
>> It seems to solve the problem nicely!!!
>>
>> Cheers,
>> Dan
>>
>> On Fri Dec 05 2014 at 9:35:04 AM Tiffany Grenier <[email protected]>
>> wrote:
>>
>>> The problem is that when you have *[text title '{:title}'
>>> required=true]* and that {:title} contains a single quote... well, this
>>> piece of markup is parsed differently in the web browser, and only a part
>>> of {:title} is displayed, the one coming before the quote.
>>> If you take th etime to retype it correctly, however, it will be
>>> correctly saved. In fact, if I call, let's say hypothetically,
>>> {tomsfriends:title} on another page, I will see "Tom's friends".
>>>
>>> Le vendredi 5 décembre 2014 16:29:40 UTC+1, Dan a écrit :
>>>>
>>>> I thought we had this escaped but seems it doesn't work perfectly. I'll
>>>> add this to my todo list to see if I can improve this just a bit.
>>>>
>>>> Cheers,
>>>> Dan
>>>>
>>>> On Fri Dec 05 2014 at 8:48:25 AM Tiffany Grenier <[email protected]>
>>>> wrote:
>>>>
>>>>> I did not find where this comes from, and it's really bothering me. My
>>>>> mebers have found a workaround, which is either to write "<br />" or to
>>>>> jump always at least two lines.
>>>>> By the way, no that you are mentioning quotes, I think the simple
>>>>> quotes in action.title and action.data should be replaced by double 
>>>>> quotes,
>>>>> since single quotes are used more often (at least in French, whre it's
>>>>> common use... but also in English for things like "it's" and "Tom's")
>>>>> Cheers,
>>>>> Tiffany
>>>>>
>>>>> Le vendredi 5 décembre 2014 15:10:20 UTC+1, Dan a écrit :
>>>>>>
>>>>>> Did you ever solve this problem for your member? I though BoltWire
>>>>>> cleaned up all the line returns before it saved it, but evidently it is
>>>>>> getting missed some place. If we can find it, I'll definitely fix it--as 
>>>>>> I
>>>>>> consider this a bug in the code. But let me know if you have a solution
>>>>>> first. If not I'll look into it a bit more.
>>>>>>
>>>>>> While we are at it, we should also try to identify some other MSWORD
>>>>>> special chars like open and closing quotes, etc--and replace them with
>>>>>> BoltWire's straight quotes or better still the corresponding html entity.
>>>>>> I've had situations where people cut and paste those into a page and they
>>>>>> get mangled in the html. Sounds like a good to do project--before we go 
>>>>>> to
>>>>>> 5.xx.  :)
>>>>>>
>>>>>> Cheers,
>>>>>> Dan
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Fri Dec 05 2014 at 7:31:02 AM Tiffany Grenier <
>>>>>> [email protected]> wrote:
>>>>>>
>>>>> Hi Dan,
>>>>>>>
>>>>>>> I also have been having a lot of work lately, so please accept also
>>>>>>> my apologies for not answering this sooner.
>>>>>>> You are right, I'm sorry. I did not see it that way. The problem I
>>>>>>> had was that some mmeber of my Boltwire website were writing first page
>>>>>>> contents in text-file with windows-like end of line, before 
>>>>>>> copy-pasting it
>>>>>>> into the edit form. Since my proposition did not solve this issue 
>>>>>>> either, I
>>>>>>> think the problem is coming from somewhere else.
>>>>>>>
>>>>>>> Thank you for taking some time to think about it.
>>>>>>> Cheers,
>>>>>>> Tiffany
>>>>>>>
>>>>>>> Le jeudi 20 novembre 2014 08:23:53 UTC+1, Tiffany Grenier a écrit :
>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> I saw in the code a couple of times things like
>>>>>>>> if ($args['lines'] != '') {
>>>>>>>>         if ( $args['lines'] == 'false' ) $content =
>>>>>>>> str_replace("\n", '\n', $content); // condense
>>>>>>>>         if ( $args['lines'] == 'true' ) $content =
>>>>>>>> str_replace('\n', "\n", $content); // expand
>>>>>>>>         }
>>>>>>>> or like         if ( $args['lines'] !== 'false' ) $content =
>>>>>>>> str_replace('\n', "\n", $content);
>>>>>>>>
>>>>>>>> Also, the return carriage \r is only taken care of in the log
>>>>>>>> function.
>>>>>>>>
>>>>>>>> I was wondering if this was really the desired behaviour...
>>>>>>>> Why not write in engine.php a BOLTdealwithlines function like the
>>>>>>>> following and do        $content = BOLTedalwithlines($content,$args);
>>>>>>>> or        $content = BOLTdealwithlines($content,$args,array('!false'));
>>>>>>>> when necessary?
>>>>>>>>
>>>>>>>> function BOLTdealwithlines($content,$args,$checkedValues='') {
>>>>>>>>     if($checkedValues == '') $checkedValues = array('true','false');
>>>>>>>>     $content = str_replace(array('\r\n', '\r'), '\n', $content);
>>>>>>>>     $content = str_replace(array("\r\n", "\r"), "\n", $content);
>>>>>>>>     if ($args['lines'] != '') {
>>>>>>>>         if (($args['lines'] === 'false' && in_array('false',$
>>>>>>>> checkedValues)) || ($args['lines'] !== true && in_array('!true',$
>>>>>>>> checkedValues)))
>>>>>>>>             $content = str_replace("\n", '\n', $content); //
>>>>>>>> condense
>>>>>>>>         if (($args['lines'] === 'true' && in_array('true',$
>>>>>>>> checkedValues)) || ($args['lines'] !== 'false' &&
>>>>>>>> in_array('!false',$checkedValues)))
>>>>>>>>             $content = str_replace('\n', "\n", $content); // expand
>>>>>>>>         }
>>>>>>>>     return $content;
>>>>>>>>     }
>>>>>>>>
>>>>>>>> Cheers,
>>>>>>>> Tiffany
>>>>>>>>
>>>>>>>  --
>>>>>>> You received this message because you are subscribed to the Google
>>>>>>> Groups "BoltWire" group.
>>>>>>>
>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>> send an email to [email protected].
>>>>>>> To post to this group, send email to [email protected].
>>>>>>
>>>>>>
>>>>>>> Visit this group at http://groups.google.com/group/boltwire.
>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>
>>>>>>  --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "BoltWire" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to [email protected].
>>>>> To post to this group, send email to [email protected].
>>>>> Visit this group at http://groups.google.com/group/boltwire.
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "BoltWire" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To post to this group, send email to [email protected].
>>> Visit this group at http://groups.google.com/group/boltwire.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "BoltWire" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/boltwire.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"BoltWire" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/boltwire.
For more options, visit https://groups.google.com/d/optout.

Reply via email to