Last modified: 2014-10-22 04:50:22 UTC
(hmm, why did this submit early?) When a construct such as {{DISPLAYTITLE:<b>Foo bar<b>}} is used, the unbalanced tags leak and affect the rest of the page, as well as MediaWiki's interface.
Maybe an extension problem on wikipedia? I have tested on a clean 1.24wmf5 version without anything and AllowDisplayTitle=true and RestrictDisplayTitle=false, but if i use displytitle parser hook in te same format like given (unclosed b-tag) i become only the plain title without bold (it's written bold, if i close the tag correctly). So, on a fresh mediawiki installation i can not reproduce this error (correct me, if i does everything false :)).
I've tracked this problem down to Sanitizer::removeHTMLtags and $wgUseTidy. When $wgUseTidy is disabled (as it is on default MediaWiki installations), calling Sanitizer::removeHTMLtags on "<b>test<b>" correctly yields "<b>test<b></b>". However, when it is enabled, calling it on "<b>test<b>" yields "<b>test<b>" back unchanged, which is incorrect and the cause of this bug.
Related to this, I've found that if you save the page with the following code on enwiki, it results in some very strange formatting: <table> <table>Some text (The whitespace appears to be important.) See https://en.wikipedia.org/w/index.php?title=User:Mr._Stradivarius/Sandbox&oldid=630607976 for an example. You might need to try the link a few times; it appears to be an intermittent behaviour. Additionally, if this code is used on preview, it sometimes causes the input to be lost. I've opened bug 72343 about this.
Created attachment 16838 [details] Strange formatting after using double unclosed table tags