From: Brion Vibber Date: Sun, 3 Oct 2004 01:45:45 +0000 (+0000) Subject: XHTML fix: escape links put into HTML X-Git-Tag: 1.5.0alpha1~1679 X-Git-Url: http://git.cyclocoop.org/%22.%28%24lien.?a=commitdiff_plain;h=88e274b346f3a7d7ee6039567bdec12b8b1b4381;p=lhc%2Fweb%2Fwiklou.git XHTML fix: escape links put into HTML --- diff --git a/includes/DifferenceEngine.php b/includes/DifferenceEngine.php index b28cc13367..ae4eef2be5 100644 --- a/includes/DifferenceEngine.php +++ b/includes/DifferenceEngine.php @@ -249,8 +249,8 @@ class DifferenceEngine { $dbr =& wfGetDB( DB_SLAVE ); if ( 0 == $this->mNewid || 0 == $this->mOldid ) { $wgOut->setArticleFlag( true ); - $newLink = $wgTitle->getLocalUrl(); - $this->mPagetitle = wfMsg( 'currentrev' ); + $newLink = $wgTitle->escapeLocalUrl(); + $this->mPagetitle = htmlspecialchars( wfMsg( 'currentrev' ) ); $this->mNewtitle = "{$this->mPagetitle}"; $id = $wgTitle->getArticleID(); @@ -278,8 +278,8 @@ class DifferenceEngine { $t = $wgLang->timeanddate( $s->old_timestamp, true ); $this->mNewPage = Title::MakeTitle( $s->old_namespace, $s->old_title ); - $newLink = $wgTitle->getLocalUrl ('oldid=' . $this->mNewid); - $this->mPagetitle = wfMsg( 'revisionasof', $t ); + $newLink = $wgTitle->escapeLocalUrl ('oldid=' . $this->mNewid); + $this->mPagetitle = htmlspecialchars( wfMsg( 'revisionasof', $t ) ); $this->mNewtitle = "{$this->mPagetitle}"; $this->mNewUser = $s->old_user_text; $this->mNewComment = $s->old_comment; @@ -311,8 +311,8 @@ class DifferenceEngine { $this->mOldtext = Article::getRevisionText( $s ); $t = $wgLang->timeanddate( $s->old_timestamp, true ); - $oldLink = $this->mOldPage->getLocalUrl ('oldid=' . $this->mOldid); - $this->mOldtitle = "" . wfMsg( 'revisionasof', $t ) . ''; + $oldLink = $this->mOldPage->escapeLocalUrl ('oldid=' . $this->mOldid); + $this->mOldtitle = "" . htmlspecialchars( wfMsg( 'revisionasof', $t ) ) . ''; $this->mOldUser = $s->old_user_text; $this->mOldComment = $s->old_comment;