Merge "SpecialLinkSearch: Use LinkRenderer instead of MediaWikiPageLinkRenderer"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 23 Jun 2016 14:28:01 +0000 (14:28 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 23 Jun 2016 14:28:01 +0000 (14:28 +0000)
includes/parser/Parser.php

index 65dde21..26b4bd9 100644 (file)
@@ -1470,10 +1470,14 @@ class Parser {
                                ' ' => '',
                                'x' => 'X',
                        ] );
-                       $titleObj = SpecialPage::getTitleFor( 'Booksources', $num );
-                       return '<a href="' .
-                               htmlspecialchars( $titleObj->getLocalURL() ) .
-                               "\" class=\"internal mw-magiclink-isbn\">ISBN $isbn</a>";
+                       return $this->getLinkRenderer()->makeKnownLink(
+                               SpecialPage::getTitleFor( 'Booksources', $num ),
+                               "ISBN $isbn",
+                               [
+                                       'class' => 'internal mw-magiclink-isbn',
+                                       'title' => false // suppress title attribute
+                               ]
+                       );
                } else {
                        return $m[0];
                }