From: Aryeh Gregor Date: Mon, 15 Jan 2007 16:29:41 +0000 (+0000) Subject: * (bug 8643) Correctly escape the page-specific CSS class for non-Monobook skins X-Git-Tag: 1.31.0-rc.0~54379 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=c7098cde761994408652563c44a5cc56900d3671;p=lhc%2Fweb%2Fwiklou.git * (bug 8643) Correctly escape the page-specific CSS class for non-Monobook skins * Tweak a comment * Use $this->mTitle instead of $wgTitle in SkinTemplate, I suppose, although there's no difference --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index bf69b6bede..6b2216f47d 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -72,6 +72,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 8522) Provide a "delete" link on Special:Brokenredirects for users with the appropriate permission * (bug 8628) Add user-aware block list link to Special:Blockip +* (bug 8643) Correctly escape the page-specific CSS class for non-Monobook skins == Languages updated == diff --git a/includes/Sanitizer.php b/includes/Sanitizer.php index 0c0f72444b..f7c31bd313 100644 --- a/includes/Sanitizer.php +++ b/includes/Sanitizer.php @@ -743,7 +743,7 @@ class Sanitizer { * Given a value, escape it so that it can be used as a CSS class and * return it. * - * TODO: For extra validity, input should be validated UTF-8. + * @todo For extra validity, input should be validated UTF-8. * * @link http://www.w3.org/TR/CSS21/syndata.html Valid characters/format * diff --git a/includes/Skin.php b/includes/Skin.php index f7a862a4de..e7f6df8d56 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -518,7 +518,7 @@ END; $a['onload'] .= 'setupRightClickEdit()'; } $a['class'] = 'ns-'.$wgTitle->getNamespace().' '.($wgContLang->isRTL() ? "rtl" : "ltr"). - ' '.Sanitizer::escapeId( 'page-'.$wgTitle->getPrefixedText() ); + ' '.Sanitizer::escapeClass( 'page-'.$wgTitle->getPrefixedText() ); return $a; } diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index 28619dc8e7..b52609f7db 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -193,7 +193,7 @@ class SkinTemplate extends Skin { $tpl->set( 'title', $wgOut->getPageTitle() ); $tpl->set( 'pagetitle', $wgOut->getHTMLTitle() ); $tpl->set( 'displaytitle', $wgOut->mPageLinkTitle ); - $tpl->set( 'pageclass', Sanitizer::escapeClass( 'page-'.$wgTitle->getPrefixedText() ) ); + $tpl->set( 'pageclass', Sanitizer::escapeClass( 'page-'.$this->mTitle->getPrefixedText() ) ); $nsname = isset( $wgCanonicalNamespaceNames[ $this->mTitle->getNamespace() ] ) ? $wgCanonicalNamespaceNames[ $this->mTitle->getNamespace() ] :