Hi,
I'm getting complaints from users using my Widgets and HeaderTabs extensions' parser functions that their output is mangled with <p> tags.
Looking into the issues I identified two separate problems and I'll be very happy if you can confirm that I'm correct and help me resolve them.
First issue: Output of all parser functions is preceded with "\n\n" in Parser.php line 2975 (on current stable 1.12 branch) which purposefully forces closing </p><p> combination which contradicts with users expectations that it will actually be inline if they put parser function inline. Here's the code:
# Replace raw HTML by a placeholder # Add a blank line preceding, to prevent it from mucking up # immediately preceding headings if ( $isHTML ) { $text = "\n\n" . $this->insertStripItem( $text ); }
This is quite distracting since there is no way to work around this in extensions or page text.
Second issue: If output of the function has line breaks in it, it gets populated by lots of <p> tags which might not be desirable if extension is supposed to preserve HTML structure (e.g. Widgets extension). I found a piece of instruction on how to avoid it by using unique markers and 'ParserAfterTidy' hook: http://www.mediawiki.org/wiki/Manual:Tag_extensions#How_can_I_avoid_modifica... please let me know if this is still going to work correctly with new parser implementation.
I'll greatly appreciate your help with the matter.
Thank you,
Sergey