https://bugzilla.wikimedia.org/show_bug.cgi?id=26302

           Summary: on edit page wpMinorEdit and wpWatchThis labels
                    malformed
           Product: MediaWiki
           Version: 1.18-svn
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: Page editing
        AssignedTo: wikibugs-l@lists.wikimedia.org
        ReportedBy: petrel.h...@gmail.com


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;

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to