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.