Since Malte (onli) really improved the plugin with the p option most issues vanished, but still some did not match. It is a hard way coding all possible eventualities.
As I have been the (only?) one who is a apologist of still using the br option - knowing all these problems coming up when using handwritten or other markup plugins HTML in entries and independent from all further semantic questions - I added some enhancements to the plugin to discuss usibility here, before asking Garvin to upload.
My first (private) improvement (option clean_tags) tried to find a way to get rid of <br>'s done by the plugin in special cases like (table|thead|tbody|tfoot|th|tr|td|caption|colgroup|col|ol|ul|li|dl|dt|dd)
This did solve my private issues when writing handmade entries.
After listening to the last podcast n° 4, I wrote a comment with the rising idea of just using a simple and easy to remember tag, to shut down the NL2BR parsing inside an entry without getting complicated in coding all possible eventualities.
This is what I did now, uploading a version 2.1 here.
You can now just use <nl>do not parse newline to br inside</nl> to shut down the parsing multiple, but not nested, times in your entry.
I left the 'clean_tags' addition as a fallback option to use. But the ISOBR - as I called this default option - is working very nice and easy.
There still is the issue of not adding additional br or p tags, if the wysiwyg-editor, the textile, or markdown plugin already took care about markup. I tried to use this to prevent using NL2BR in these cases, but I am still not sure if this is bulletproof enough.
Code: Select all
if ( $serendipity['wysiwyg'] ||
class_exists('serendipity_event_textile') ||
class_exists('serendipity_event_markdown') )
{
return true;
}