From: Aryeh Gregor Date: Tue, 10 Jul 2007 01:32:30 +0000 (+0000) Subject: (bug 10413) DISPLAYTITLE doesn't escape HTML entities, causing the displayed title... X-Git-Tag: 1.31.0-rc.0~52171 X-Git-Url: http://git.cyclocoop.org/%22.htmlspecialchars%28%24url_syndic%29.%22?a=commitdiff_plain;h=977b6fcf227d6cadada10ad20aec4528b83e8ffb;p=lhc%2Fweb%2Fwiklou.git (bug 10413) DISPLAYTITLE doesn't escape HTML entities, causing the displayed title to a) be wrong and b) not normalize to the actual title. No RELEASE-NOTES because this feature was only added this release anyway. Patch based on one by WebBoy. --- diff --git a/includes/CoreParserFunctions.php b/includes/CoreParserFunctions.php index 2f9b1e2fda..261452aa29 100644 --- a/includes/CoreParserFunctions.php +++ b/includes/CoreParserFunctions.php @@ -107,7 +107,7 @@ class CoreParserFunctions { * @return string */ static function displaytitle( $parser, $text = '' ) { - $text = trim( $text ); + $text = trim( Sanitizer::decodeCharReferences( $text ) ); $title = Title::newFromText( $text ); if( $title instanceof Title && $title->getFragment() == '' && $title->equals( $parser->mTitle ) ) $parser->mOutput->setDisplayTitle( $text );