Last modified: 2010-12-22 17:16:50 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T28329, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 26329 - malformed: no "title=" for tooltip on Revision History
malformed: no "title=" for tooltip on Revision History
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Recent changes (Other open bugs)
1.18.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-12-13 22:09 UTC by petrel.harp
Modified: 2010-12-22 17:16 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description petrel.harp 2010-12-13 22:09:54 UTC
The tooltip for the "undo" link on a "Compare selected revisions" page is put in in a way that results in malformed HTML (and is thus a problem if served as XHTML). The "title=" and surrounding quotes are omitted. For instance:

<a href='/mw/index.php?title=Stochastic_growth/Main_paper&amp;action=edit&amp;undoafter=2746&amp;undo=2760' "Undo" reverts this edit and opens the edit form in preview mode. It allows adding a reason in the summary.>

The problem seems to be in DifferenceEngine.php; below is a diff that fixes it (although perhaps the tooltip message should be run through something that e.g. escapes the quotes first?).

See also the similar (same origin?) bug #26302, traced to r75763 .


-----------

--- includes/diff/DifferenceEngine.php	(revision 78212)
+++ includes/diff/DifferenceEngine.php	(working copy)
@@ -1017,7 +1017,7 @@
 			$htmlLink = htmlspecialchars( wfMsg( 'editundo' ) );
 			$htmlTitle = $wgUser->getSkin()->titleAttrib( 'undo' );
 			if ( $editable && !$this->mOldRev->isDeleted( Revision::DELETED_TEXT ) && !$this->mNewRev->isDeleted( Revision::DELETED_TEXT ) ) {
-				$this->mNewtitle .= " (<a href='$newUndo' $htmlTitle>" . $htmlLink . "</a>)";
+				$this->mNewtitle .= " (<a href='$newUndo' title='$htmlTitle'>" . $htmlLink . "</a>)";
 			}
 
 			if ( !$this->mOldRev->userCan( Revision::DELETED_TEXT ) ) {
Comment 1 Alexandre Emsenhuber [IAlex] 2010-12-22 17:16:50 UTC
This was fixed in r78264.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links