|
Disallow BR input but convert single newlines to BR February 01, 2011 12:35PM |
Registered: 2 years ago Posts: 1 |
I modified AutoParagraph to convert each single newline in a given paragraph to . It works fantastically.
The problem is that to do it I had to allow 'br', which means my users can now fill the screen with line breaks.
How should I deal with this? I want HTMLPurifier to remove all the 'br' tags from user input, but I also want it to output 'br' tags when I tell it to. I thought about ripping them out with preg_replace before I run it through the purifier, but if a user wants to post pre-formatted code, that's going to be a problem.
Any ideas?
|
Re: Disallow BR input but convert single newlines to BR February 01, 2011 12:39PM |
Admin Registered: 6 years ago Posts: 2,632 |