r85991 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85990‎ | r85991 | r85992 >
Date:22:20, 13 April 2011
Author:platonides
Status:ok
Tags:
Comment:
Readd support for headings inside tables, broken in r85922 and reported on its CodeReview.
Added testcase for it.
It changes again Parser24.
Modified paths:
  • /trunk/phase3/includes/parser/Parser.php (modified) (history)
  • /trunk/phase3/tests/parser/parserTests.txt (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/parser/parserTests.txt
@@ -1406,7 +1406,24 @@
14071407
14081408 !! end
14091409
 1410+!! test
 1411+Heading inside table (affected by r85922)
 1412+!! input
 1413+{|
 1414+|- valign="top"
 1415+|
 1416+=== Heading ===
 1417+|}
 1418+!! result
 1419+<table>
14101420
 1421+<tr valign="top">
 1422+<td>
 1423+<h3><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: Heading">edit</a>]</span> <span class="mw-headline" id="Heading"> Heading </span></h3>
 1424+</td></tr></table>
 1425+
 1426+!! end
 1427+
14111428 !! test
14121429 Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html)
14131430 !! input
@@ -5578,6 +5595,7 @@
55795596 # </td>
55805597 # </tr>
55815598 # </table>
 5599+# Known to produce bad XML for now
55825600 !! test
55835601 Fuzz testing: Parser24
55845602 !! options
@@ -5593,9 +5611,10 @@
55945612 |
55955613 !! result
55965614 <p>{{{|
5597 -<u class="&#124;">}}}} &gt;
5598 -<br style="onmouseover=&#39;alert(document.cookie);&#39;" />
5599 -</p><p>MOVE YOUR MOUSE CURSOR OVER THIS TEXT
 5615+</p><p><u class="&#124;">}}}} &gt;
 5616+</p><p><br style="onmouseover=&#39;alert(document.cookie);&#39;" />
 5617+</p><p><br />
 5618+MOVE YOUR MOUSE CURSOR OVER THIS TEXT
56005619 </p>
56015620 <table>
56025621 <tr>
Index: trunk/phase3/includes/parser/Parser.php
@@ -955,7 +955,7 @@
956956 $output =& $currentElement['content'];
957957
958958 } else {
959 - $output .= $outLine . "\n";
 959+ $output .= "\n$outLine\n";
960960 }
961961 }
962962

Follow-up revisions

RevisionCommit summaryAuthorDate
r86002Follow up r85991. For some reason I committed the test for r85921 parser, not...platonides23:12, 13 April 2011
r86064Fix for r85990, which broke lists inside tables; adding test for itdiebuche18:45, 14 April 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r85922diebuche21:27, 12 April 2011

Status & tagging log