Last modified: 2010-12-12 18:35:38 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 T28302, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 26302 - on edit page wpMinorEdit and wpWatchThis labels malformed
on edit page wpMinorEdit and wpWatchThis labels malformed
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Page editing (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-11 01:47 UTC by petrel.harp
Modified: 2010-12-12 18:35 UTC (History)
2 users (show)

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


Attachments

Description petrel.harp 2010-12-11 01:47:20 UTC
There is malformed html in the 'label' tags for the minor edit and watchlist checkboxes on the Edit page.  This causes rendering errors if served as XHTML.

The malformed code:

<label for='wpMinoredit' id='mw-editpage-minoredit'Mark this as a minor edit [i]>This is a minor edit</label>

<label for='wpWatchthis' id='mw-editpage-watch'Add this page to your watchlist [w]>Watch this page</label></div>

This occurs on lines 2355 and 2368 of EditPage.php; the following is put into the label tag:
  $skin->titleAttrib( 'minoredit', 'withaccess' )
... and I have no idea why.  The diff below removes this and fixes the bug.



Index: includes/EditPage.php
===================================================================
--- includes/EditPage.php   (revision 78212)
+++ includes/EditPage.php   (working copy)
@@ -2355,7 +2355,7 @@
            );
            $checkboxes['minor'] =
                Xml::check( 'wpMinoredit', $checked['minor'], $attribs ) .
-               "&#160;<label for='wpMinoredit' id='mw-editpage-minoredit'" . $skin->titleAttrib( 'minoredit', 'withaccess' ) . ">{$minorLabel}</label>";
+               "&#160;<label for='wpMinoredit' id='mw-editpage-minoredit'>{$minorLabel}</label>";
        }

        $watchLabel = wfMsgExt( 'watchthis', array( 'parseinline' ) );
@@ -2368,7 +2368,7 @@
            );
            $checkboxes['watch'] =
                Xml::check( 'wpWatchthis', $checked['watch'], $attribs ) .
-               "&#160;<label for='wpWatchthis' id='mw-editpage-watch'" . $skin->titleAttrib( 'watch', 'withaccess' ) . ">{$watchLabel}</label>";
+               "&#160;<label for='wpWatchthis' id='mw-editpage-watch'>{$watchLabel}</label>";
        }
        wfRunHooks( 'EditPageBeforeEditChecks', array( &$this, &$checkboxes, &$tabindex ) );
        return $checkboxes;
Comment 1 Aaron Schulz 2010-12-11 05:58:10 UTC
Tracing to r75763.
Comment 2 Sam Reed (reedy) 2010-12-12 18:35:38 UTC
r78264

Thanks for the report! :)

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


Navigation
Links