19
Well.. this line..
$text =preg_replace("/(\015\012)|(\015)|(\012)/","
", $text);
on display, text sanitizer will not replace all line breaks with
tags. So if you say post a news article it wont output any line breaks submit.
The line you added removes all
tags. So there will never be any line breaks in anything you post. At least none will be output. Basically text sanitizer converts line breaks into
and then your line deletes that
and all others. By default
isn't in the "allowed html" anyways, but I added it to my XOOPS config.
I'm not sure what you are trying to do. I'll assume you're posting html into the textarea and it's coming out with a lot of
tags ruining your formatting. Well what you did will prevent ANY line breaks from being displayed that goes thru text sanitizer, which accounts for just about (if not) all XOOPS modules that come packaged with xoops.
I've hacked up Haruki's wfsection module to include a switch to Enable Line Break Filtering on display. So when you check it, the script will filter out any line breaks in your code before it runs thru text sanitizer. This may solve your line break problem, but text sanitizer will still check for "allowed html". So if you're using any weird tags it still might cause you problems.. I'll add a checkbox to disable html, smilies and forum codes a little later. You can try this hacked up wfsections module here:
http://www.dailabs.com/wfsection_hack-612.zipI'd suggest you try it out before using it in production environment.. I'll take no responsibility if anything blows up
tho it shouldn't.