Index: trunk/phase3/includes/diff/DifferenceEngine.php |
— | — | @@ -1027,15 +1027,15 @@ |
1028 | 1028 | $this->mOldtitle = "<a href='$oldLink'>{$this->mOldPagetitle}</a>" |
1029 | 1029 | . " (<a href='$oldEdit'>" . wfMsgHtml( $editable ? 'editold' : 'viewsourceold' ) . "</a>)"; |
1030 | 1030 | // Add an "undo" link |
1031 | | - $newUndo = $this->mNewPage->escapeLocalUrl( array( |
1032 | | - 'action' => 'edit', |
1033 | | - 'undoafter' => $this->mOldid, |
1034 | | - 'undo' => $this->mNewid |
1035 | | - ) ); |
1036 | | - $htmlLink = htmlspecialchars( wfMsg( 'editundo' ) ); |
1037 | | - $htmlTitle = Xml::expandAttributes( array( 'title' => $wgUser->getSkin()->titleAttrib( 'undo' ) ) ); |
1038 | 1031 | if ( $editable && !$this->mOldRev->isDeleted( Revision::DELETED_TEXT ) && !$this->mNewRev->isDeleted( Revision::DELETED_TEXT ) ) { |
1039 | | - $this->mNewtitle .= " (<a href='$newUndo' $htmlTitle>" . $htmlLink . "</a>)"; |
| 1032 | + $undoLink = Html::element( 'a', array( |
| 1033 | + 'href' => $this->mNewPage->getLocalUrl( array( |
| 1034 | + 'action' => 'edit', |
| 1035 | + 'undoafter' => $this->mOldid, |
| 1036 | + 'undo' => $this->mNewid ) ), |
| 1037 | + 'title' => $wgUser->getSkin()->titleAttrib( 'undo' ) |
| 1038 | + ), wfMsg( 'editundo' ) ); |
| 1039 | + $this->mNewtitle .= ' (' . $undoLink . ')'; |
1040 | 1040 | } |
1041 | 1041 | |
1042 | 1042 | if ( !$this->mOldRev->userCan( Revision::DELETED_TEXT ) ) { |