r105983 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105982‎ | r105983 | r105984 >
Date:04:58, 13 December 2011
Author:jeroendedauw
Status:ok
Tags:
Comment:
rem use of escapeLocalURL
Modified paths:
  • /trunk/phase3/includes/SkinLegacy.php (modified) (history)
  • /trunk/phase3/includes/api/ApiFormatXml.php (modified) (history)
  • /trunk/phase3/includes/parser/Parser.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialAllpages.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/parser/Parser.php
@@ -1176,7 +1176,7 @@
11771177 ));
11781178 $titleObj = SpecialPage::getTitleFor( 'Booksources', $num );
11791179 return'<a href="' .
1180 - $titleObj->escapeLocalUrl() .
 1180+ htmlspecialchars( $titleObj->getLocalUrl() ) .
11811181 "\" class=\"internal mw-magiclink-isbn\">ISBN $isbn</a>";
11821182 } else {
11831183 return $m[0];
Index: trunk/phase3/includes/api/ApiFormatXml.php
@@ -201,7 +201,7 @@
202202 $this->setWarning( 'Stylesheet should have .xsl extension.' );
203203 return;
204204 }
205 - $this->printText( '<?xml-stylesheet href="' . $nt->escapeLocalURL( 'action=raw' ) . '" type="text/xsl" ?>' );
 205+ $this->printText( '<?xml-stylesheet href="' . htmlspecialchars( $nt->getLocalURL( 'action=raw' ) ) . '" type="text/xsl" ?>' );
206206 }
207207
208208 public function getAllowedParams() {
Index: trunk/phase3/includes/SkinLegacy.php
@@ -247,7 +247,7 @@
248248 }
249249 $s = $wgLang->pipeList( array(
250250 $s,
251 - '<a href="' . $title->escapeLocalURL( 'variant=' . $code ) . '">' . htmlspecialchars( $varname ) . '</a>'
 251+ '<a href="' . htmlspecialchars( $title->getLocalURL( 'variant=' . $code ) ) . '">' . htmlspecialchars( $varname ) . '</a>'
252252 ) );
253253 }
254254 }
Index: trunk/phase3/includes/specials/SpecialAllpages.php
@@ -278,7 +278,7 @@
279279
280280 $queryparams = $namespace ? "namespace=$namespace&" : '';
281281 $special = $this->getTitle();
282 - $link = $special->escapeLocalUrl( $queryparams . 'from=' . urlencode($inpoint) . '&to=' . urlencode($outpoint) );
 282+ $link = htmlspecialchars( $special->getLocalUrl( $queryparams . 'from=' . urlencode($inpoint) . '&to=' . urlencode($outpoint) ) );
283283
284284 $out = $this->msg( 'alphaindexline' )->rawParams(
285285 "<a href=\"$link\">$inpointf</a></td><td>",

Follow-up revisions

RevisionCommit summaryAuthorDate
r105984Follow up to r105983;jeroendedauw05:00, 13 December 2011

Status & tagging log