|}
!! result
<table>
-<caption>caption</caption>
+<caption>caption
+</caption>
<tr><td></td></tr>
</table>
|}
!! result
<table border="1" cellpadding="2">
-<caption>Multiplication table</caption>
+<caption>Multiplication table
+</caption>
<thead>
<tr>
<th>×</th>
!! end
+!! test
+Heading inside table (affected by r85922)
+!! input
+{|
+|- valign="top"
+|
+=== Heading ===
+|}
+!! result
+<table>
+<tr valign="top">
+<td>
+<h3><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Heading">edit</a>]</span> <span class="mw-headline" id="Heading"> Heading </span></h3>
+</td>
+</tr>
+</table>
+
+!! end
+
+!! test
+A table with a caption with unclosed italic
+!! input
+{|
+|+ ''caption
+| Cell
+|}
+!! result
+<table>
+<caption><i>caption</i>
+</caption>
+<tr>
+<td>Cell</td>
+</tr>
+</table>
+
+!! end
+
+!! test
+A table with unclosed italic in a cell
+!! input
+{|
+| ''Cell
+|}
+!! result
+<table>
+<tr>
+<td><i>Cell</i></td>
+</tr>
+</table>
+
+!! end
+
+!! test
+A table with unclosed italic in a th
+!! input
+{|
+|-
+! ''Cell
+|| Value
+|}
+!! result
+<table>
+<tr>
+<th><i>Cell</i></th>
+<td>Value</td>
+</tr>
+</table>
+
+!! end
!! test
Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html)
!! end
+!! test
+Indented Tables, bug 20078
+!! input
+: {|
+| 1 || 2
+|-
+| 3 || 4
+|}
+!! result
+<dl><dd><table>
+<tr>
+<td>1</td>
+<td>2</td>
+</tr>
+<tr>
+<td>3</td>
+<td>4</td>
+</tr>
+</table></dd></dl>
+!! end
###
### Internal links
###
!! input
==a==
{| STYLE=__TOC__
+|foo
!! result
<h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: a">edit</a>]</span> <span class="mw-headline" id="a">a</span></h2>
<table style="__TOC__">
-<tr><td></td></tr>
+<tr>
+<td>foo</td>
+</tr>
</table>
!! end
http://===r:::https://b
{|
+
!!result
<p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
</p>
-<table>
-<tr><td></td></tr>
-</table>
!! end
# </td>
# </tr>
# </table>
+# Known to produce bad XML for now
!! test
Fuzz testing: Parser24
!! options
|
!! result
<p>{{{|
-<u class="|">}}}} >
-<br style="onmouseover='alert(document.cookie);'" />
-</p><p>MOVE YOUR MOUSE CURSOR OVER THIS TEXT
+</p><p><u class="|">}}}} >
+</p><p><br style="onmouseover='alert(document.cookie);'" />
+</p><p><br />
+MOVE YOUR MOUSE CURSOR OVER THIS TEXT
</p>
<table>
<tr>