X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FArticle.php;h=d2f52bcf0e0f9badb5b1c9a5c21ce96662795b27;hb=b809d516dbb7bbf3b2017e8436b4f26477355f79;hp=e5919cfe793d52194782177942baf02dad823911;hpb=c151d6e6871493ba4df628ae6bc5c33a7262a243;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Article.php b/includes/Article.php index e5919cfe79..d2f52bcf0e 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -988,8 +988,9 @@ class Article implements Page { // Set the fragment if one was specified in the redirect if ( strval( $this->getTitle()->getFragment() ) != '' ) { - $fragment = Xml::escapeJsString( $this->getTitle()->getFragmentForURL() ); - $outputPage->addInlineScript( "redirectToFragment(\"$fragment\");" ); + $outputPage->addInlineScript( Xml::encodeJsCall( + 'redirectToFragment', array( $this->getTitle()->getFragmentForURL() ) + ) ); } // Add a tag @@ -1188,7 +1189,7 @@ class Article implements Page { } elseif ( $this->getContext()->getRequest()->getInt( 'unhide' ) != 1 ) { # Give explanation and add a link to view the revision... $oldid = intval( $this->getOldID() ); - $link = $this->getTitle()->getFullUrl( "oldid={$oldid}&unhide=1" ); + $link = $this->getTitle()->getFullURL( "oldid={$oldid}&unhide=1" ); $msg = $this->mRevision->isDeleted( Revision::DELETED_RESTRICTED ) ? 'rev-suppressed-text-unhide' : 'rev-deleted-text-unhide'; $outputPage->wrapWikiMsg( "\n", @@ -1727,7 +1728,7 @@ class Article implements Page { * * @param $oldid mixed integer Revision ID or null * @param $user User The relevant user - * @return ParserOutput or false if the given revsion ID is not found + * @return ParserOutput or false if the given revision ID is not found */ public function getParserOutput( $oldid = null, User $user = null ) { //XXX: bypasses mParserOptions and thus setParserOptions()