Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/142608
Change subject: Replace deprecated Title::escapeFullURL calls ...................................................................... Replace deprecated Title::escapeFullURL calls Change-Id: I430049c2b48b20542a623fecc88d7f5f3ee05f14 --- M LinkClass.php M LinkFilterHooks.php M LinkPage.php M SpecialLinksHome.php 4 files changed, 17 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LinkFilter refs/changes/08/142608/1 diff --git a/LinkClass.php b/LinkClass.php index 0087952..260a06d 100644 --- a/LinkClass.php +++ b/LinkClass.php @@ -27,17 +27,17 @@ public static function getSubmitLinkURL() { $title = SpecialPage::getTitleFor( 'LinkSubmit' ); - return $title->escapeFullURL(); + return htmlspecialchars( $title->getFullURL() ); } public static function getLinkAdminURL() { $title = SpecialPage::getTitleFor( 'LinkApprove' ); - return $title->escapeFullURL(); + return htmlspecialchars( $title->getFullURL() ); } public static function getHomeLinkURL() { $title = SpecialPage::getTitleFor( 'LinksHome' ); - return $title->escapeFullURL(); + return htmlspecialchars( $title->getFullURL() ); } /** @@ -344,7 +344,7 @@ 'type_name' => Link::getLinkType( $row->link_type ), 'user_id' => $row->link_submitter_user_id, 'user_name' => $row->link_submitter_user_name, - 'wiki_page' => ( ( $linkPage ) ? $linkPage->escapeFullURL() : null ), + 'wiki_page' => ( ( $linkPage ) ? htmlspecialchars( $linkPage->getFullURL() ) : null ), 'comments' => ( ( $row->link_comment_count ) ? $row->link_comment_count : 0 ) ); } diff --git a/LinkFilterHooks.php b/LinkFilterHooks.php index 2332e2c..01c0f37 100644 --- a/LinkFilterHooks.php +++ b/LinkFilterHooks.php @@ -144,9 +144,9 @@ $output = '<div> <div class="linkfilter-links"> - <a href="' . $link_submit->escapeFullURL() . '">' . + <a href="' . htmlspecialchars( $link_submit->getFullURL() ) . '">' . wfMessage( 'linkfilter-submit' )->plain() . - '</a> / <a href="' . $link_all->escapeFullURL() . '">' . + '</a> / <a href="' . htmlspecialchars( $link_all->getFullURL() ) . '">' . wfMessage( 'linkfilter-all' )->plain() . '</a>'; // Show a link to the link administration panel for privileged users diff --git a/LinkPage.php b/LinkPage.php index 65afc66..7e01556 100644 --- a/LinkPage.php +++ b/LinkPage.php @@ -114,10 +114,10 @@ true ); $linkRedirect = SpecialPage::getTitleFor( 'LinkRedirect' ); - $url = $linkRedirect->escapeFullURL( array( + $url = htmlspecialchars( $linkRedirect->getFullURL( array( 'link' => 'true', 'url' => $this->link['url'] - ) ); + ) ) ); $output = '<div class="link-container"> <div class="link-url"> <span class="link-type">' @@ -200,11 +200,11 @@ $output = '<h2>' . wfMessage( 'linkfilter-about-submitter' )->text() . '</h2>'; $output .= "<div class=\"author-container $css_fix\"> <div class=\"author-info\"> - <a href=\"" . $authorTitle->escapeFullURL() . "\" rel=\"nofollow\"> + <a href=\"" . htmlspecialchars( $authorTitle->getFullURL() ) . "\" rel=\"nofollow\"> {$avatar->getAvatarURL()} </a> <div class=\"author-title\"> - <a href=\"" . $authorTitle->escapeFullURL() . "\" rel=\"nofollow\">{$authorUserName}</a> + <a href=\"" . htmlspecialchars( $authorTitle->getFullURL() ) . "\" rel=\"nofollow\">{$authorUserName}</a> </div>"; if ( $profileData['about'] ) { $output .= $wgOut->parse( $profileData['about'], false ); @@ -297,7 +297,7 @@ foreach ( $links as $link ) { $output .= '<div class="link-recent"> - <a href="' . $linkRedirect->escapeFullURL( "url={$link['url']}" ) . + <a href="' . htmlspecialchars( $linkRedirect->getFullURL( "url={$link['url']}" ) ) . "\" target=\"new\">{$link['title']}</a> </div>"; } @@ -412,7 +412,7 @@ } $output .= '<div class="cod-item">'; $output .= '<span class="cod-score">' . $comment['plus_count'] . '</span> '; - $output .= " <span class=\"cod-comment\"><a href=\"{$pageTitle->escapeFullURL()}#comment-{$comment['comment_id']}\" title=\"{$pageTitle->getText()}\" >{$commentText}</a></span>"; + $output .= " <span class=\"cod-comment\"><a href=\"{htmlspecialchars( $pageTitle->getFullURL() )}#comment-{$comment['comment_id']}\" title=\"{$pageTitle->getText()}\" >{$commentText}</a></span>"; $output .= '</div>'; } diff --git a/SpecialLinksHome.php b/SpecialLinksHome.php index a082084..1b87e66 100644 --- a/SpecialLinksHome.php +++ b/SpecialLinksHome.php @@ -79,7 +79,7 @@ foreach ( $popularLinks as $popularLink ) { $titleObj = Title::makeTitle( NS_LINK, $popularLink['title'] ); $html .= '<div class="listpages-item">'; - $html .= '<a href="' . $titleObj->escapeFullURL() . '">' . + $html .= '<a href="' . htmlspecialchars( $titleObj->getFullURL() ) . '">' . $titleObj->getText() . '</a> </div><!-- .listpages-item --> @@ -236,8 +236,8 @@ </div> <div class=\"link-item\"> <div class=\"link-item-url\"> - <a href=\"" . $linkRedirect->escapeFullURL( array( - 'link' => 'true', 'url' => $link['url'] ) ) . + <a href=\"" . htmlspecialchars( $linkRedirect->getFullURL( array( + 'link' => 'true', 'url' => $link['url'] ) ) ) . '" target="new">' . $link['title'] . '</a> </div> @@ -340,7 +340,7 @@ $feed = new LinkFeed( $this->msg( 'linkfilter-feed-title' )->parse(), '', - $this->getPageTitle()->escapeFullURL() + htmlspecialchars( $this->getPageTitle()->getFullURL() ) ); $feed->outHeader(); @@ -349,7 +349,7 @@ $item = new FeedItem( '[' . $link['type_name'] . '] ' . $link['title'], str_replace( 'http://', '', $link['url'] ), - Title::newFromId( $link['page_id'] )->escapeFullURL() + htmlspecialchars( Title::newFromId( $link['page_id'] )->getFullURL() ) ); $feed->outItem( $item ); } -- To view, visit https://gerrit.wikimedia.org/r/142608 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I430049c2b48b20542a623fecc88d7f5f3ee05f14 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/LinkFilter Gerrit-Branch: master Gerrit-Owner: Umherirrender <umherirrender_de...@web.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits