r45189 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45188‎ | r45189 | r45190 >
Date:16:09, 30 December 2008
Author:aaron
Status:reverted (Comments)
Tags:
Comment:
Escape entities in h1 title html
Modified paths:
  • /trunk/phase3/includes/Skin.php (modified) (history)
  • /trunk/phase3/includes/SkinTemplate.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SkinTemplate.php
@@ -183,7 +183,7 @@
184184 wfProfileOut( __METHOD__."-stuff" );
185185
186186 wfProfileIn( __METHOD__."-stuff2" );
187 - $tpl->set( 'title', $out->getPageTitle() );
 187+ $tpl->set( 'title', htmlspecialchars( $out->getPageTitle() ) );
188188 $tpl->set( 'pagetitle', $out->getHTMLTitle() );
189189 $tpl->set( 'displaytitle', $out->mPageLinkTitle );
190190 $tpl->set( 'pageclass', $this->getPageClasses( $this->mTitle ) );
Index: trunk/phase3/includes/Skin.php
@@ -1018,7 +1018,7 @@
10191019
10201020 function pageTitle() {
10211021 global $wgOut;
1022 - $s = '<h1 class="pagetitle">' . $wgOut->getPageTitle() . '</h1>';
 1022+ $s = '<h1 class="pagetitle">' . htmlspecialchars( $wgOut->getPageTitle() ) . '</h1>';
10231023 return $s;
10241024 }
10251025

Follow-up revisions

RevisionCommit summaryAuthorDate
r45227Revert r45189 "Escape entities in h1 title html" -- double-escapingbrion17:02, 31 December 2008

Comments

#Comment by Brion VIBBER (talk | contribs)   17:02, 31 December 2008

Reverted in r45227 as this causes double-escaping. Please don't go changing interfaces around like this, it causes trouble!

Status & tagging log