From: Alex Z Date: Sun, 26 Oct 2008 02:41:43 +0000 (+0000) Subject: restore image alt text on enhanced RC, add title to s so IE won't hide it with... X-Git-Tag: 1.31.0-rc.0~44580 X-Git-Url: http://git.cyclocoop.org/%22.htmlspecialchars%28%24url_syndic%29.%22?a=commitdiff_plain;h=2a2fa2785aceeeb389c8f48592651dbd2d55681b;p=lhc%2Fweb%2Fwiklou.git restore image alt text on enhanced RC, add title to s so IE won't hide it with the alt text. --- diff --git a/includes/ChangesList.php b/includes/ChangesList.php index febe9b1e88..0f6ff3d2e3 100644 --- a/includes/ChangesList.php +++ b/includes/ChangesList.php @@ -618,8 +618,8 @@ class EnhancedChangesList extends ChangesList { # onclick handler to toggle hidden/expanded $toggleLink = "onclick='toggleVisibility($jsid); return false'"; # Title for tags - $expandTitle = wfMsg('rc-enhanced-expand'); - $closeTitle = wfMsg('rc-enhanced-hide'); + $expandTitle = htmlspecialchars( wfMsg('rc-enhanced-expand') ); + $closeTitle = htmlspecialchars( wfMsg('rc-enhanced-hide') ); $tl = "" . $this->sideArrow() . ""; $tl .= ""; @@ -777,12 +777,15 @@ class EnhancedChangesList extends ChangesList { * Generate HTML for an arrow or placeholder graphic * @param string $dir one of '', 'd', 'l', 'r' * @param string $alt text + * @param string $title text * @return string HTML tag */ - protected function arrow( $dir ) { + protected function arrow( $dir, $alt='', $title='' ) { global $wgStylePath; $encUrl = htmlspecialchars( $wgStylePath . '/common/images/Arr_' . $dir . '.png' ); - return ""; + $encAlt = htmlspecialchars( $alt ); + $encTitle = htmlspecialchars( $title ); + return "\"$encAlt\""; } /** @@ -793,7 +796,7 @@ class EnhancedChangesList extends ChangesList { protected function sideArrow() { global $wgContLang; $dir = $wgContLang->isRTL() ? 'l' : 'r'; - return $this->arrow( $dir ); + return $this->arrow( $dir, '+', wfMsg('rc-enhanced-expand') ); } /** @@ -802,7 +805,7 @@ class EnhancedChangesList extends ChangesList { * @return string HTML tag */ protected function downArrow() { - return $this->arrow( 'd' ); + return $this->arrow( 'd', '-', wfMsg('rc-enhanced-hide') ); } /** @@ -810,7 +813,7 @@ class EnhancedChangesList extends ChangesList { * @return string HTML tag */ protected function spacerArrow() { - return $this->arrow( '' ); + return $this->arrow( '', ' ' ); } /**