https://bugzilla.wikimedia.org/show_bug.cgi?id=65863
Bug ID: 65863
Summary: Extraneous HTML produced by msg->parse()
Product: MediaWiki
Version: 1.22.6
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: Unprioritized
Component: General/Unknown
Assignee: [email protected]
Reporter: [email protected]
Web browser: ---
Mobile Platform: ---
At some point fairly recently, the behavior of the Message Class parse function
change, so that it now leaves extraneous HTML after the parsed text. This
creates issues with output created by core Mediawiki functions that use this
functionality.
Example: Parsing a message key that should result in the word "Contact" in
English.
Message::parseText() returns:
<p>Contact\n</p><p><br />\n</p>
The Message::toString function applies a Regex to this.
if ( preg_match( '/^<p>(.*)\n?<\/p>\n?$/sU', $string, $m ) ) {
$string = $m[1];
}
It looks like this may be trying to remove the extraneous HTML, but it doesn't
entirely succeed. Instead, the result is:
Contact\n</p><p><br />
which, of course, creates unnecessary blank lines in the output.
--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l