Page MenuHomePhabricator

Badly formed xhtml on protection page
Closed, ResolvedPublic

Description

I got some bug reports about Twinkle, that the protection feature had stopped working, so I investigated it;

First, the Error console spits out:
Error: mismatched tag. Expected: </table>.
Source File: http://en.wikipedia.org/w/index.php?title=User%3AAzaToth%2FX42&action=protect
Line: 119, Column: 399
Source Code:
<script type="text/javascript" src="/skins-1.5/common/protect.js?122"></script><form method="post" action="/w/index.php?title=User:AzaToth/X42&amp;action=protect" id="mw-Protect-Form" onsubmit="protectEnable(true)"><input name="wpEditToken" type="hidden" value="769c3394e8789be2f0cef8bf308eb4ba+\" /><fieldset><legend>Confirm protection</legend><table id="mwProtectSet"><th>Edit</th><th>Move</th></tr>
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------^

Though this might be difficult to understand, I vent to validate the page at w3.org, and here is the following errors:

Line 126, Column 417: document type does not allow element "th" here; assuming missing "tr" start-tag.

…</legend><table id="mwProtectSet"><th>Edit</th><th>Move</th></tr>

Error Line 129, Column 7: end tag for element "tbody" which is not open.

</tbody></table><table id="mw-protect-table2"><tbody><tr>

The Validator found an end tag for the above element, but that element is not currently open. This is often caused by a leftover end tag from an element that was removed during editing, or by an implicitly closed element (if you have an error related to an element being used where it is not allowed, this is almost certainly the case). In the latter case this error will disappear as soon as you fix the original problem.

If this error occurred in a script section of your document, you should probably read this FAQ entry.

Error Line 126, Column > 80: XML Parsing Error: Opening and ending tag mismatch: table line 126 and tr.

…1.5/common/protect.js?122"></script><form method="post" action="/w/index.php?…

Error Line 129, Column 8: XML Parsing Error: Opening and ending tag mismatch: fieldset line 126 and tbody.

</tbody></table><table id="mw-protect-table2"><tbody><tr>

Error Line 129, Column 16: XML Parsing Error: Opening and ending tag mismatch: form line 126 and table.

</tbody></table><table id="mw-protect-table2"><tbody><tr>

Error Line 151, Column 27: XML Parsing Error: Opening and ending tag mismatch: div line 110 and fieldset.

</tbody></table></fieldset></form><script type="text/javascript">var wgCascadeab

Error Line 151, Column 34: XML Parsing Error: Opening and ending tag mismatch: div line 76 and form.

</tbody></table></fieldset></form><script type="text/javascript">var wgCascadeab

Error Line 160, Column 8: XML Parsing Error: Opening and ending tag mismatch: body line 73 and div.

		</div>

Error Line 269, Column 6: XML Parsing Error: Opening and ending tag mismatch: html line 2 and div.

</div>

Error Line 271, Column 40: XML Parsing Error: Extra content at the end of the document.

<!-- Served by srv189 in 0.134 secs. --></body></html>


Version: unspecified
Severity: major

Details

Reference
bz13428

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:05 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz13428.
bzimport added a subscriber: Unknown Object (MLST).

Fixed in r32147. There was a ; where a . was meant, and a couple elements fell out of output.