Fomafix has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/390896 )
Change subject: Let Html::element do the HTML encoding
......................................................................
Let Html::element do the HTML encoding
Change-Id: I6d9063af3f4ff0a6d70f3ebbce8362122d5bb06a
---
M includes/Linker.php
M includes/installer/WebInstaller.php
2 files changed, 6 insertions(+), 6 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/96/390896/1
diff --git a/includes/Linker.php b/includes/Linker.php
index 403b10a..29584ce 100644
--- a/includes/Linker.php
+++ b/includes/Linker.php
@@ -721,9 +721,11 @@
$href = self::getUploadUrl( $title, $query );
- return '<a href="' . htmlspecialchars( $href ) . '"
class="new" title="' .
- htmlspecialchars( $title->getPrefixedText(),
ENT_QUOTES ) . '">' .
- $encLabel . '</a>';
+ return Html::element( 'a', [
+ 'href' => $href,
+ 'class' => 'new',
+ 'title' => $title->getPrefixedText()
+ ], $label );
}
return self::link( $title, $encLabel, [], wfCgiToArray( $query
), [ 'known', 'noclasses' ] );
diff --git a/includes/installer/WebInstaller.php
b/includes/installer/WebInstaller.php
index e0e54c8..b65e85e 100644
--- a/includes/installer/WebInstaller.php
+++ b/includes/installer/WebInstaller.php
@@ -1132,9 +1132,7 @@
public function docLink( $linkText, $attribs, $parser ) {
$url = $this->getDocUrl( $attribs['href'] );
- return '<a href="' . htmlspecialchars( $url ) . '">' .
- htmlspecialchars( $linkText ) .
- '</a>';
+ return Html::element( 'a', [ 'href' => $url ], $linkText );
}
/**
--
To view, visit https://gerrit.wikimedia.org/r/390896
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6d9063af3f4ff0a6d70f3ebbce8362122d5bb06a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Fomafix <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits