From 396f2684b83b67d11f0fda45fd9c14b1ea4d9d10 Mon Sep 17 00:00:00 2001 From: Fomafix Date: Wed, 13 Sep 2017 13:49:02 +0200 Subject: [PATCH] Move call of Sanitizer::decodeCharReferences from Skin to Parser Supporting HTML entities in Wikitext is part of the parser not of the skin. Change-Id: Ib30ff08f4f4ce585f31211aa24b719783f06456e --- includes/parser/ParserOutput.php | 2 +- includes/skins/Skin.php | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/includes/parser/ParserOutput.php b/includes/parser/ParserOutput.php index 06319e5575..3480a51f3c 100644 --- a/includes/parser/ParserOutput.php +++ b/includes/parser/ParserOutput.php @@ -259,7 +259,7 @@ class ParserOutput extends CacheTime { global $wgOut, $wgLang; $editsectionPage = Title::newFromText( htmlspecialchars_decode( $m[1] ) ); $editsectionSection = htmlspecialchars_decode( $m[2] ); - $editsectionContent = isset( $m[4] ) ? $m[3] : null; + $editsectionContent = isset( $m[4] ) ? Sanitizer::decodeCharReferences( $m[3] ) : null; if ( !is_object( $editsectionPage ) ) { throw new MWException( "Bad parser output text." ); diff --git a/includes/skins/Skin.php b/includes/skins/Skin.php index df7a9edede..f9090e1361 100644 --- a/includes/skins/Skin.php +++ b/includes/skins/Skin.php @@ -1578,8 +1578,6 @@ abstract class Skin extends ContextSource { $attribs = []; if ( !is_null( $tooltip ) ) { - # T27462: undo double-escaping. - $tooltip = Sanitizer::decodeCharReferences( $tooltip ); $attribs['title'] = wfMessage( 'editsectionhint' )->rawParams( $tooltip ) ->inLanguage( $lang )->text(); } -- 2.20.1