s/htmlspecialchars/urlencode/ for a URL get parameter
authorBrion Vibber <brion@users.mediawiki.org>
Mon, 15 Jan 2007 18:08:35 +0000 (18:08 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Mon, 15 Jan 2007 18:08:35 +0000 (18:08 +0000)
otherwise will fail for names containing '&' or perhaps other places

includes/SpecialBlockip.php

index 5a2ace0..dddc9d3 100644 (file)
@@ -336,7 +336,7 @@ class IPBlockForm {
        private function getUnblockLink( $skin ) {
                $list = SpecialPage::getTitleFor( 'Ipblocklist' );
                if( $this->BlockAddress ) {
-                       $addr = htmlspecialchars( strtr( $this->BlockAddress, '_', ' ' ) );
+                       $addr = urlencode( strtr( $this->BlockAddress, '_', ' ' ) );
                        return $skin->makeKnownLinkObj( $list, wfMsgHtml( 'ipb-unblock-addr', $addr ),
                                'action=unblock&ip=' . $this->BlockAddress );
                } else {