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.
