jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/326501 )

Change subject: Fix DOMDiff annotations
......................................................................


Fix DOMDiff annotations

* Replaced unused "deleted-child" annotation with "children-changed"
  annotation. This immediately improved selser results on a number
  of tests (which actually manifests as newly failing selser tests).

  This is because triggers the DU.onlySubtreeChanged(..) check in
  the serializer which then emits the element wrappers from original
  source.

* Whenever a deleted / inserted mark is added, we now update the
  parent with a "children-changed" annotation. This fixes an edge case
  from the first for T149209 which wasn't caught by the previous patch.

  I updated a parser test which fails without this change but passes
  with this change. It correctly prevents reuse of original source
  on edit.

* Added a missing update of the subtree-changed annotation.

Change-Id: Ie457e867966865c8774f7ea792a6fc68a85876f8
---
M lib/html2wt/DOMDiff.js
M tests/parserTests-blacklist.js
M tests/parserTests.txt
3 files changed, 51 insertions(+), 9 deletions(-)

Approvals:
  jenkins-bot: Verified
  Arlolra: Looks good to me, approved



diff --git a/lib/html2wt/DOMDiff.js b/lib/html2wt/DOMDiff.js
index c052494..7a55550 100644
--- a/lib/html2wt/DOMDiff.js
+++ b/lib/html2wt/DOMDiff.js
@@ -236,6 +236,7 @@
        var baseNode = baseParentNode.firstChild;
        var newNode = newParentNode.firstChild;
        var lookaheadNode = null;
+       var subtreeDiffers;
        var foundDiffOverall = false;
        var dontAdvanceNewNode = false;
 
@@ -314,7 +315,11 @@
                                        if 
(!DU.isEncapsulationWrapper(baseNode) &&
                                                
!DU.isEncapsulationWrapper(savedNewNode)) {
                                                // Dont recurse into 
template-like-content
-                                               this.doDOMDiff(baseNode, 
savedNewNode);
+                                               subtreeDiffers = 
this.doDOMDiff(baseNode, savedNewNode);
+                                               if (subtreeDiffers) {
+                                                       this.debug("--found 
diff: subtree-changed--");
+                                                       this.markNode(newNode, 
'subtree-changed');
+                                               }
                                        }
                                } else {
                                        // We now want to compare current 
newNode with the next baseNode.
@@ -335,7 +340,7 @@
                } else if (!DU.isEncapsulationWrapper(baseNode) && 
!DU.isEncapsulationWrapper(newNode)) {
                        this.debug("--shallow equal: recursing--");
                        // Recursively diff subtrees if not template-like 
content
-                       var subtreeDiffers = this.doDOMDiff(baseNode, newNode);
+                       subtreeDiffers = this.doDOMDiff(baseNode, newNode);
                        if (subtreeDiffers) {
                                this.debug("--found diff: subtree-changed--");
                                this.markNode(newNode, 'subtree-changed');
@@ -364,7 +369,7 @@
        // having lost children for now.
        if (baseNode) {
                this.debug("--found trailing base nodes: deleted--");
-               this.markNode(newParentNode, 'deleted-child');
+               this.markNode(newParentNode, 'children-changed');
                // SSS FIXME: WTS checks for zero children in a few places
                // That code would have to be upgraded if we emit mw:DiffMarker
                // in this scenario. So, bailing out in this one case for now.
@@ -406,9 +411,14 @@
                        this.env.log("error/domdiff", "Unhandled node type", 
node.nodeType, "in markNode!");
                }
        }
+
        if (meta && blockNodeDeleted) {
                meta.setAttribute('data-is-block', 'true');
        }
+
+       if (change === 'deleted' || change === 'inserted') {
+               this.markNode(node.parentNode, 'children-changed');
+       }
 };
 
 if (typeof module === "object") {
diff --git a/tests/parserTests-blacklist.js b/tests/parserTests-blacklist.js
index 4571014..065547a 100644
--- a/tests/parserTests-blacklist.js
+++ b/tests/parserTests-blacklist.js
@@ -1419,13 +1419,14 @@
 add("selser", "A table with captions with non-default spaced attributes and a 
table row [[0,2,4,0,3,[4,0]]]", "{|\n<!--8folgr0kquboi529-->|+style=\"color: 
red;\"|caption2<!--9isvnh2z6j2it3xr-->\n|+ style=\"color: red;\"| 
caption3<!--cegg9qdr9hjgu8fr-->\n|}");
 add("selser", "A table with captions with non-default spaced attributes and a 
table row [[2,0,2,3,3,3]]", "{|<!--69d5z7pa8iio1or-->\n|+style=\"color: 
red;\"|caption2<!--1r97810ys18j8aor-->\n|}");
 add("selser", "A table with captions with non-default spaced attributes and a 
table row [2]", "ogl2d411a038r529\n{|\n|+style=\"color: red;\"|caption2\n|+ 
style=\"color: red;\"| caption3\n|-\n| foo\n|}");
-add("selser", "A table with captions with non-default spaced attributes and a 
table row [[4,[3],2,0,3,[[3,4],4]]]", "{|<!--glpyv8ws43elv7vi-->\n|+ 
style=\"color: red;\" |<!--977mpdg7bdg6i529-->\n|+ style=\"color: red;\"| 
caption3\n|-\n|vnlowwkt14hadcxr<!--tw8w8jwmz4p1fw29-->\n|}");
+add("selser", "A table with captions with non-default spaced attributes and a 
table row [[4,[3],2,0,3,[[3,4],4]]]", 
"{|<!--glpyv8ws43elv7vi-->\n|+style=\"color: red;\"|<!--977mpdg7bdg6i529-->\n|+ 
style=\"color: red;\"| 
caption3\n|-\n|vnlowwkt14hadcxr<!--tw8w8jwmz4p1fw29-->\n|}");
 add("selser", "A table with captions with non-default spaced attributes and a 
table row [[2,2,0,4,2,[0,4]]]", 
"{|<!--hq2lymey7xxkcsor-->\n<!--q20r2b6ga9xry66r-->|+style=\"color: 
red;\"|caption2\n<!--kyojp7sr96v18aor--><!--bky3qng4ga2a9k9-->\n|-\n| 
foo<!--phpg9eaca86ez5mi-->\n|}");
 add("selser", "A table with captions with non-default spaced attributes and a 
table row [[0,[2],0,0,0,[[0,2],0]]]", "{|\n|+style=\"color: 
red;\"|rsk37teyuq22csorcaption2\n|+ style=\"color: red;\"| 
caption3\n|-\n|vefem1fh6g1ll3di\n| foo\n|}");
 add("selser", "A table with captions with non-default spaced attributes and a 
table row [[2,0,3,[2],0,[2,0]]]", "{|<!--8q7n7m2tbswwb3xr-->\n|+style=\"color: 
red;\"|caption2\n|+ style=\"color: red;\"|lcnpzckjupgphkt9 
caption3\n<!--px2ept6jeswnrk9-->|-\n| foo\n|}");
 add("selser", "A table with captions with non-default spaced attributes and a 
table row [1]", "{| data-foobar=\"o9k0fan234k7qfr\"\n|+style=\"color: 
red;\"|caption2\n|+ style=\"color: red;\"| caption3\n|-\n| foo\n|}");
 add("selser", "A table with captions with non-default spaced attributes and a 
table row [[0,[2],0,2,3,[[2,0],0]]]", "{|\n|+style=\"color: 
red;\"|w96hfg740cm78pvicaption2\n<!--s66fh5bg5g1wz5mi-->|+ style=\"color: 
red;\"| caption3\n|-\n|i7akogjci8i4fgvi\n| foo\n|}");
 add("selser", "A table with captions with non-default spaced attributes and a 
table row [[3,4,3,0,0,1]]", "{|<!--xb57b1mfbeh77gb9-->\n|+ style=\"color: 
red;\"| caption3\n|-\n| foo\n|}");
+add("selser", "A table with captions with non-default spaced attributes and a 
table row [[2,3,0,[3],2,[[2,[3]],2]]]", "{|<!--qssu20xawa27f1or-->\n\n|+ 
style=\"color: 
red;\"|<!--mtiu0m92iy3c8fr-->\n|-\n|0vrw74af0wzh0k9\n|<!--lj2jxa2gumobt9-->\n|}");
 add("selser", "A table with captions with non-default spaced attributes and a 
table row [[0,0,0,1,4,3]]", "{|\n|+style=\"color: red;\"|caption2\n|+ 
style=\"color: red;\" data-foobar=\"4n9ju8e6u4ayk3xr\" | 
caption3<!--8vitqxcwje89f6r-->\n|}");
 add("selser", "A table with captions with non-default spaced attributes and a 
table row [[0,0,2,[3],3,[[0,4],0]]]", "{|\n|+style=\"color: 
red;\"|caption2<!--4865t93rr418aor-->\n|+ style=\"color: red;\" 
|\n|-\n|n2z1139bdvuc8fr\n|}");
 add("selser", "Table td-cell syntax variations [2]", "sbzhcg70xtq8semi\n{|\n| 
foo bar foo | baz\n| foo bar foo || baz\n| style='color:red;' | baz\n| 
style='color:red;' || baz\n|}");
@@ -1450,10 +1451,13 @@
 add("selser", "Table rowspan [2]", "xb37vwsdil6gk3xr\n{| border=1\n| Cell 1, 
row 1\n|rowspan=2| Cell 2, row 1 (and 2)\n| Cell 3, row 1\n|-\n| Cell 1, row 
2\n| Cell 3, row 2\n|}");
 add("selser", "Table rowspan [1]", "{| border=\"1\" 
data-foobar=\"xgpmrwgiugpbvs4i\"\n| Cell 1, row 1\n|rowspan=2| Cell 2, row 1 
(and 2)\n| Cell 3, row 1\n|-\n| Cell 1, row 2\n| Cell 3, row 2\n|}");
 add("selser", "Table rowspan [[0,[1,0,2,0]]]", "{| border=1\n| Cell 1, row 
1\n|rowspan=2| Cell 2, row 1 (and 2)\n| Cell 3, row 
1\n<!--esqo19m7kv620529-->|-\n| Cell 1, row 2\n| Cell 3, row 2\n|}");
+add("selser", "Table rowspan [[3,4]]", "{| 
border=1<!--4cemtsqp21lqsemi-->\n|}");
 add("selser", "Table rowspan [[2,2]]", "{| 
border=1<!--c9eo96nqfmjthuxr-->\n<!--mdmpc8uzbgoxn7b9-->| Cell 1, row 
1\n|rowspan=2| Cell 2, row 1 (and 2)\n| Cell 3, row 1\n|-\n| Cell 1, row 2\n| 
Cell 3, row 2\n|}");
+add("selser", "Table rowspan [[3,3]]", "{| border=1\n|}");
 add("selser", "Table rowspan [[0,[1,0,2,2]]]", "{| border=1\n| Cell 1, row 
1\n|rowspan=2| Cell 2, row 1 (and 2)\n| Cell 3, row 
1\n<!--f24m9zom9d2kpgb9-->|-\n| Cell 1, row 2\n| Cell 3, row 
2<!--houk9s548i3pu8fr-->\n|}");
 add("selser", "Table rowspan [[3,[1,0,[0,2,0,4],2]]]", "{| border=1\n| Cell 1, 
row 1\n|rowspan=2| Cell 2, row 1 (and 2)\n| Cell 3, row 
1\n|-\n|gsp7c59fnpadobt9\n| Cell 1, row 
2\n|bwzd1d95wa7wg66r<!--68bu9hd9zl37syvi-->\n|}");
 add("selser", "Table rowspan [[0,[[4,0,4,0,1],0,1,2]]]", "{| 
border=1\n|aspxhnaofiqf47vi\n|73fyijt65nuerk9\n| 
data-foobar=\"t7trqii8bukp4x6r\" | Cell 3, row 1\n|- 
data-foobar=\"1pkfpcn5xq6t7qfr\"\n| Cell 1, row 2\n| Cell 3, row 
2<!--sebb2ix3zzzadcxr-->\n|}");
+add("selser", "Table rowspan [[0,3]]", "{| border=1\n|}");
 add("selser", "Table rowspan [[0,4]]", "{| 
border=1\n<!--1gqzmb9oym34n29-->|}");
 add("selser", "Table rowspan [[4,1]]", "{| border=1<!--df20a6ug11ao47vi-->\n| 
Cell 1, row 1\n|rowspan=2| Cell 2, row 1 (and 2)\n| Cell 3, row 1\n|-\n| Cell 
1, row 2\n| Cell 3, row 2\n|}");
 add("selser", "Table rowspan [[0,[2,0,4,0]]]", "{| 
border=1\n<!--bz2zkuwgtbotj4i-->| Cell 1, row 1\n|rowspan=2| Cell 2, row 1 (and 
2)\n| Cell 3, row 1\n<!--hynk9y1byaw6ogvi-->\n|}");
@@ -1462,6 +1466,7 @@
 add("selser", "Nested table [[0,[1,4]]]", "{| border=1\n| &alpha;\n|\n{| 
bgcolor=#ABCDEF border=2\n|nested\n|-\n|table\n|}\n|the original table 
again<!--t5nreiu3qsxuhaor-->\n|}");
 add("selser", "Nested table [[0,2]]", "{| border=1\n<!--262ep7u743gqr529-->| 
&alpha;\n|\n{| bgcolor=#ABCDEF border=2\n|nested\n|-\n|table\n|}\n|the original 
table again\n|}");
 add("selser", "Nested table [2]", "y38000xvz4vg3nmi\n{| border=1\n| 
&alpha;\n|\n{| bgcolor=#ABCDEF border=2\n|nested\n|-\n|table\n|}\n|the original 
table again\n|}");
+add("selser", "Nested table [[0,3]]", "{| border=1\n|}");
 add("selser", "Nested table [[2,[4,2]]]", "{| 
border=1<!--0dbf76hr5a9bpgb9-->\n<!--dkjh2vfrzy9cnmi--><!--dr69h58wuje5ewmi-->\n|}");
 add("selser", "Nested table [[2,3]]", "{| 
border=1<!--cn1vfhuotu5qxgvi-->\n|}");
 add("selser", "Nested table [[4,1]]", "{| border=1<!--21kjc55zx2tbuik9-->\n| 
&alpha;\n|\n{| bgcolor=#ABCDEF border=2\n|nested\n|-\n|table\n|}\n|the original 
table again\n|}");
@@ -1491,22 +1496,24 @@
 add("selser", "! and || in element attributes should not be parsed as 
<th>/<td> [[4,1]]", "{|<!--5o9uhp5or2hp8pvi-->\n| <div style=\"color: red 
!important;\" data-contrived=\"put this here ||\">hi</div>\n|}");
 add("selser", "! and || in element attributes should not be parsed as 
<th>/<td> [[3,2]]", "{|<!--97k7uhewx6flxr-->\n| <div style=\"color: red 
!important;\" data-contrived=\"put this here ||\">hi</div>\n|}");
 add("selser", "! and || in element attributes should not be parsed as 
<th>/<td> [[0,2]]", "{|\n<!--4geia2gf0fwdn29-->| <div style=\"color: red 
!important;\" data-contrived=\"put this here ||\">hi</div>\n|}");
-add("selser", "! and || in element attributes should not be parsed as 
<th>/<td> [[0,[[[3],0],0]]]", "{|\n|||\">hi</div>\n|}");
 add("selser", "! and || in element attributes should not be parsed as 
<th>/<td> [2]", "rvse1pnm4h1tt9\n{|\n| <div style=\"color: red !important;\" 
data-contrived=\"put this here ||\">hi</div>\n|}");
 add("selser", "Invalid text in table attributes should be preserved by 
selective serializer [[3,[[[2],2,[2]],4]]]", "{| <span>boo</span> 
style='border:1px solid black'\n|  <span>boo</span> style='color:blue'  
|7heq8g2ck6sz6w29 1\n|v6rf01a7kqwa5rk9\n| style=\"color:blue\" boo 
|jhg1k6fpupiudi 2<!--ies8jqiml07ldi-->\n|}");
 add("selser", "Invalid text in table attributes should be preserved by 
selective serializer [[0,4]]", "{| <span>boo</span> style='border:1px solid 
black'\n<!--dc3vg6fqkc5wmi-->|}");
 add("selser", "Invalid text in table attributes should be preserved by 
selective serializer [1]", "{| style=\"border:1px solid black\" 
data-foobar=\"jk8a0xv4efbkpgb9\" boo\n|  <span>boo</span> style='color:blue'  | 
1\n|<span>boo</span> style='color:blue'| 2\n|}");
 add("selser", "Invalid text in table attributes should be preserved by 
selective serializer [[2,3]]", "{| <span>boo</span> style='border:1px solid 
black'<!--7ojb0zqx5j1exw29-->\n|}");
-add("selser", "Invalid text in table attributes should be preserved by 
selective serializer [[4,[[1,0,[3]],2]]]", "{| <span>boo</span> 
style='border:1px solid black'<!--8vx1whpxwwbtke29-->\n| style=\"color:blue\" 
data-foobar=\"xg53sdt7es2rcnmi\" boo | 1\n| style=\"color:blue\" boo 
|<!--op83k5uu7e0o1or-->\n|}");
+add("selser", "Invalid text in table attributes should be preserved by 
selective serializer [[4,[[1,0,[3]],2]]]", "{| <span>boo</span> 
style='border:1px solid black'<!--8vx1whpxwwbtke29-->\n| style=\"color:blue\" 
data-foobar=\"xg53sdt7es2rcnmi\" boo | 1\n|<span>boo</span> 
style='color:blue'|<!--op83k5uu7e0o1or-->\n|}");
 add("selser", "Invalid text in table attributes should be preserved by 
selective serializer [[2,[3,0]]]", "{| <span>boo</span> style='border:1px solid 
black'<!--h93f7aryb2y5jyvi-->\n\n|}");
 add("selser", "Invalid text in table attributes should be preserved by 
selective serializer [[0,[1,0]]]", "{| <span>boo</span> style='border:1px solid 
black'\n|  <span>boo</span> style='color:blue'  | 1\n|<span>boo</span> 
style='color:blue'| 2\n|}");
 add("selser", "Invalid text in table attributes should be preserved by 
selective serializer [[0,1]]", "{| <span>boo</span> style='border:1px solid 
black'\n|  <span>boo</span> style='color:blue'  | 1\n|<span>boo</span> 
style='color:blue'| 2\n|}");
 add("selser", "Invalid text in table attributes should be preserved by 
selective serializer [2]", "vibkg0u39zggmn29\n{| <span>boo</span> 
style='border:1px solid black'\n|  <span>boo</span> style='color:blue'  | 
1\n|<span>boo</span> style='color:blue'| 2\n|}");
 add("selser", "Invalid text in table attributes should be preserved by 
selective serializer [[2,[[3,0,2],0]]]", "{| <span>boo</span> style='border:1px 
solid black'<!--jzs32tawks8oxbt9-->\n|javt374thssv2t9\n| style=\"color:blue\" 
boo | 2\n|}");
+add("selser", "Invalid text in table attributes should be preserved by 
selective serializer [[0,3]]", "{| <span>boo</span> style='border:1px solid 
black'\n|}");
 add("selser", "Invalid text in table attributes should be preserved by 
selective serializer [[4,4]]", "{| <span>boo</span> style='border:1px solid 
black'<!--it2ztc1nnhlg14i--><!--ualcthhpt9wqxgvi-->\n|}");
+add("selser", "Invalid text in table attributes should be preserved by 
selective serializer [[4,3]]", "{| <span>boo</span> style='border:1px solid 
black'<!--ibah2ua3t1dwvcxr-->\n|}");
 add("selser", "Invalid text in table attributes should be preserved by 
selective serializer [[0,[1,4]]]", "{| <span>boo</span> style='border:1px solid 
black'\n|  <span>boo</span> style='color:blue'  | 1\n|<span>boo</span> 
style='color:blue'| 2<!--3j73mr8elhiio1or-->\n|}");
 add("selser", "Invalid text in table attributes should be preserved by 
selective serializer [[0,2]]", "{| <span>boo</span> style='border:1px solid 
black'\n<!--5m1l4u4l4kkjra4i-->|  <span>boo</span> style='color:blue'  | 
1\n|<span>boo</span> style='color:blue'| 2\n|}");
 add("selser", "Invalid text in table attributes should be preserved by 
selective serializer [[0,[2,0]]]", "{| <span>boo</span> style='border:1px solid 
black'\n<!--qdraylofcdd0lik9-->|  <span>boo</span> style='color:blue'  | 
1\n|<span>boo</span> style='color:blue'| 2\n|}");
+add("selser", "Invalid text in table attributes should be preserved by 
selective serializer [[3,4]]", "{| <span>boo</span> style='border:1px solid 
black'<!--nja98odom4vaemi-->\n|}");
 add("selser", "Invalid text in table attributes should be preserved by 
selective serializer [[0,[[3,0,0],0]]]", "{| <span>boo</span> style='border:1px 
solid black'\n\n|<span>boo</span> style='color:blue'| 2\n|}");
 add("selser", "Build table with {{!}} [2]", "vlzvgbqpbh6qd7vi\n{{{!}} 
class=\"wikitable\"\n! header\n! second header\n{{!}}- 
style=\"color:red;\"\n{{!}} data {{!}}{{!}} style=\"color:red;\" {{!}} second 
data\n{{!}}}");
 add("selser", "Build table with {{!}} [1]", "{{{!}} class=\"wikitable\" 
data-foobar=\"n7vob9kcmjp833di\"\n! header\n! second header\n{{!}}- 
style=\"color:red;\"\n{{!}} data {{!}}{{!}} style=\"color:red;\" {{!}} second 
data\n{{!}}}");
@@ -1548,6 +1555,7 @@
 add("selser", "Parsoid-centric test: Whitespace in ext- and wiki-links should 
be preserved [3,4,2,2,2,0,4]", "q9c5unenvqtihpvi\n\nk8q51d5k1t7w4s4i\n\n[[Foo|  
''bar'']]\n\nl31jajvwag36jemi\n\np43tgo0r9n23ayvi\n\n[http://wp.org   
foo]\n\nwffmswrjps0pb9\n");
 add("selser", "Parsoid-centric test: Whitespace in ext- and wiki-links should 
be preserved [0,2,1,3,[[4]],3,0]", "[[Foo|  bar]]\n\ncpt8orwf0l26s9k9\n\n[[Foo| 
 ''bar'']]\n\n[http://wp.org e15bwsd59u73c8fr]\n\n[http://wp.org   ''foo'']");
 add("selser", "Parsoid-centric test: Whitespace in ext- and wiki-links should 
be preserved [3,4,4,2,2,4,0]", 
"o3awmbfvt9fnu3di\n\nj0e1avrz9scvunmi\n\npvsdo8qneqe8w7b9\n\nou4krycgek8uayvi\n\n[http://wp.org
   foo]\n\nu9e32ytur700ms4i\n\n[http://wp.org   ''foo'']");
+add("selser", "Different interwiki prefixes mapping to the same URL 
[1,3,1,4,[[4]],0,3,2,[3],0,1,0,3]", 
"[[:en:Foo]]\n\n[[:en:Foo|Foo]]\n\nvkfu7mmbf3zbyb9\n\n[[wikipedia:Foo|hwt2yirpe3ik9]]\n\nsme69f22pkem6lxr\n\n[[wikipedia:en:Foo]]\n");
 add("selser", "Handling html with a div self-closing tag 
[0,0,4,0,1,0,1,0,3,4,3]", "<div title />\na2lmqbelulg6tj4i\n<div title=\"\" 
data-foobar=\"myfxsa4q14jf9a4i\" />\n<div title=\"bar\" 
data-foobar=\"16l4nxten48wipb9\" />\nfjaqot6n6yfogvi\n");
 add("selser", "Handling html with a div self-closing tag 
[0,2,3,0,1,3,4,0,0,0,2]", "<div title />hsvg8qvys3q8h0k9\n\n<div title=\"\" 
data-foobar=\"pmcyv89r6fq7iudi\" />i3jrozlq6c4n29\n<div 
title=bar/>\n50f5viswvgoav2t9<div title=bar/ >");
 add("selser", "Handling html with a div self-closing tag 
[0,2,0,2,0,0,1,2,4,3,1]", "<div title />hrkbg93g91mdkj4i\n<div 
title/>d24otck8en4s4i\n<div title/ >\n<div title=\"bar\" 
data-foobar=\"m3try3iqp9fi529\" />40lnev3wvt4t2o6r\n5cg171a8bz7aatt9<div 
title=\"bar/\" data-foobar=\"ht3kiuub2yv6lxr\">");
@@ -1695,7 +1703,7 @@
 add("selser", "2. includeonly in html attr value [[4,2,[2]]]", 
"6pbenncdmszto6ryjc093xhn7xbhuxr\n<span 
id=<noinclude>\"v1\"</noinclude><includeonly>\"v2\"</includeonly>>k35cezvnuuymbo6rbar</span>");
 add("selser", "2. includeonly in html attr value [1]", "<span 
id=\"<noinclude>v1</noinclude><includeonly>v2</includeonly>\">bar</span>\n<span 
id=<noinclude>\"v1\"</noinclude><includeonly>\"v2\"</includeonly>>bar</span>");
 add("selser", "2. includeonly in html attr value [[3,0,0]]", "\n<span 
id=<noinclude>\"v1\"</noinclude><includeonly>\"v2\"</includeonly>>bar</span>");
-add("selser", "1. Table tag in SOL posn. should get reparsed correctly with 
valid TSR [0,[0,3]]", "{{echo|}}{| width=\"100%\"\n|}");
+add("selser", "1. Table tag in SOL posn. should get reparsed correctly with 
valid TSR [0,[0,3]]", "{{echo|}}{| width = '100%'\n|}");
 add("selser", "1. Table tag in SOL posn. should get reparsed correctly with 
valid TSR [0,[0,[0,2]]]", "{{echo|}}{| width = 
'100%'\n|foo<!--7w2da44bn7idaemi-->\n|}");
 add("selser", "1. Table tag in SOL posn. should get reparsed correctly with 
valid TSR [0,1]", "{{echo|}}{| width=\"100%\" 
data-foobar=\"t98xv1gnmkhp8pvi\"\n|foo\n|}");
 add("selser", "1. Table tag in SOL posn. should get reparsed correctly with 
valid TSR [0,[0,[[[2]],3]]]", "{{echo|}}{| width = 
'100%'\n|5l8xeq1crrafw29foo\n|}");
@@ -1712,15 +1720,18 @@
 add("selser", "1. Table tag in SOL posn. should get reparsed correctly with 
valid TSR [0,[0,[4,0]]]", "{{echo|}}{| width = 
'100%'\n<!--u3at1qt3epfd2t9-->\n|}");
 add("selser", "1. Table tag in SOL posn. should get reparsed correctly with 
valid TSR [0,[3,[1,0]]]", "{{echo|}}{| width = '100%'\n|foo\n|}");
 add("selser", "1. Table tag in SOL posn. should get reparsed correctly with 
valid TSR [0,[0,[[1],4]]]", "{{echo|}}{| width = '100%'\n| 
data-foobar=\"pnyys77mkaxrms4i\" |foo<!--kok37wstwgbvs4i-->\n|}");
+add("selser", "Templates: HTML Tag: 2. Generation of HTML attr. value [[3]]", 
"<div style={{echo|'color:red;'}}></div>");
 add("selser", "Templates: HTML Tag: 2. Generation of HTML attr. value [2]", 
"jvlcnlic1v7snhfr<div style={{echo|'color:red;'}}>foo</div>");
 add("selser", "Templates: HTML Tag: 2. Generation of HTML attr. value [[2]]", 
"<div style={{echo|'color:red;'}}>s37lf2enya4f5hfrfoo</div>");
 add("selser", "Templates: HTML Tag: 2. Generation of HTML attr. value [[4]]", 
"<div style={{echo|'color:red;'}}>0yaowvq5ab3s1yvi</div>");
 add("selser", "Templates: HTML Tag: 3. Generation of HTML attr key and value 
[2]", "mqq7ag1wdxk9y66r<div {{echo|style}}={{echo|'color:red;'}}>foo</div>");
+add("selser", "Templates: HTML Tag: 3. Generation of HTML attr key and value 
[[3]]", "<div {{echo|style}}={{echo|'color:red;'}}></div>");
 add("selser", "Templates: HTML Tag: 3. Generation of HTML attr key and value 
[[2]]", "<div {{echo|style}}={{echo|'color:red;'}}>r7l1v2ib97nidx6rfoo</div>");
 add("selser", "Templates: HTML Tag: 3. Generation of HTML attr key and value 
[[4]]", "<div {{echo|style}}={{echo|'color:red;'}}>akjxxupqqamm42t9</div>");
 add("selser", "Templates: HTML Tag: 9. Multiple template-generated attributes 
[2]", "w9vxem7g66e6ogvi<div {{echo|1=id=\"v1\" title=\"foo\"}}>bar</div>");
 add("selser", "Templates: HTML Tag: 9. Multiple template-generated attributes 
[[4]]", "<div {{echo|1=id=\"v1\" title=\"foo\"}}>2dpv9wx6it9ms4i</div>");
 add("selser", "Templates: HTML Tag: 9. Multiple template-generated attributes 
[[2]]", "<div {{echo|1=id=\"v1\" title=\"foo\"}}>k7iwqjjgjgst6gvibar</div>");
+add("selser", "Templates: HTML Tag: 9. Multiple template-generated attributes 
[[3]]", "<div {{echo|1=id=\"v1\" title=\"foo\"}}></div>");
 add("selser", "Templates: HTML Tables: 5. Proper fostering of categories from 
inside [0,4,3,3,0,0,3,1]", "\n00y7omltvljfko6r\n\n<table 
data-foobar=\"jmfnmukwsfko6r\">[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>");
 add("selser", "Templates: HTML Tables: 5. Proper fostering of categories from 
inside [0,[3],0,0,3,0,4,2]", "<table></table>\n<!--Two categories (Bug 
50330)-->\naa9zlufnr5nlv7vi\n\nq2pyl7rcb4e4gqfr<table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>");
 add("selser", "Templates: HTML Tables: 5. Proper fostering of categories from 
inside [4,1,3,2,2,2,0,2]", "ixen0t4bgr8xs9k9<table 
data-foobar=\"srvdo6x0y0bb7qfr\"><tr><td>foo</td></tr></table>uzdg6q9o13xcrf6r<!--Two
 categories (Bug 
50330)-->4qtzlqvafwyaatt9\nxof76nvw8xmkj4i\n\nmjznl60h5moenrk9<table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>");
@@ -1781,13 +1792,17 @@
 add("selser", "div with single-quoted attribute [2]", "qu686umowmw8kt9<div 
id='rock'>HTML rocks</div>");
 add("selser", "div with single-quoted attribute [[4]]", "<div 
id='rock'>i9n8e3v5czxb6gvi</div>");
 add("selser", "div with single-quoted attribute [[2]]", "<div 
id='rock'>jmoatuyo3qsemiHTML rocks</div>");
+add("selser", "div with single-quoted attribute [[3]]", "<div 
id='rock'></div>");
 add("selser", "div with unquoted attribute [2]", "pmr3ap5nlf7833di<div 
id=rock>HTML rocks</div>");
 add("selser", "div with unquoted attribute [[4]]", "<div 
id=rock>3u6l54c5g919k9</div>");
+add("selser", "div with unquoted attribute [[3]]", "<div id=rock></div>");
 add("selser", "div with unquoted attribute [[2]]", "<div 
id=rock>dchtatkig10885miHTML rocks</div>");
 add("selser", "div with illegal double attributes [2]", "ux9aplu6dksdobt9<div 
id=\"a\" id=\"b\">HTML rocks</div>");
 add("selser", "div with illegal double attributes [[4]]", "<div id=\"a\" 
id=\"b\">fz25c3miv6v6xbt9</div>");
+add("selser", "div with illegal double attributes [[3]]", "<div id=\"a\" 
id=\"b\"></div>");
 add("selser", "div with illegal double attributes [[2]]", "<div id=\"a\" 
id=\"b\">unt59inh2b95p14iHTML rocks</div>");
 add("selser", "HTML multiple attributes correction [2]", "w1pqe1dx8ko9lik9<p 
class=\"error\" class=\"awesome\">Awesome!</p>");
+add("selser", "HTML multiple attributes correction [[3]]", "<p class=\"error\" 
class=\"awesome\"></p>");
 add("selser", "HTML multiple attributes correction [[4]]", "<p class=\"error\" 
class=\"awesome\">mx2dt2hekoojq0k9</p>");
 add("selser", "HTML multiple attributes correction [[2]]", "<p class=\"error\" 
class=\"awesome\">ngsrrvn0y5app66rAwesome!</p>");
 add("selser", "Table multiple attributes correction [2]", 
"youym9yoyb8adcxr\n{|\n!+ class=\"error\" class=\"awesome\"| status\n|}");
@@ -1802,6 +1817,7 @@
 add("selser", "DIV IN UPPERCASE [2]", "qcqx475zv4c2fbt9<DIV ID=\"x\">HTML 
ROCKS</DIV>");
 add("selser", "DIV IN UPPERCASE [[2]]", "<DIV ID=\"x\">0lhea1vi5vfs9k9HTML 
ROCKS</DIV>");
 add("selser", "DIV IN UPPERCASE [[4]]", "<DIV 
ID=\"x\">ae3oduwc950tqpvi</DIV>");
+add("selser", "DIV IN UPPERCASE [[3]]", "<DIV ID=\"x\"></DIV>");
 add("selser", "Media link with nasty text 5", "[[Media:Foobar.jpg|Safe 
Link<div style=display:none>\" onmouseover=\"alert(document.cookie)\" 
onfoo=\"</div>]]<div style=display:none>\" 
onmouseover=\"alert(document.cookie)\" onfoo=\"</div>\n");
 add("selser", "Media link with nasty text [[[3]],[2],0]", 
"[[Media:Foobar.jpg|<nowiki/>]]<div 
style=display:none>bz3y7tm45658w7b9[[Media:Foobar.jpg|Safe Link<div 
style=display:none>\" onmouseover=\"alert(document.cookie)\" 
onfoo=\"</div>]]</div>\n");
 add("selser", "Media link with nasty text [2,2,1]", 
"plljquqi07ap2e29\n\n[[Media:Foobar.jpg|Safe Link<div style=display:none>\" 
onmouseover=\"alert(document.cookie)\" onfoo=\"</div>]]\n\nbn7r3inxy74x6r<div 
style=display:none>\" onmouseover=\"alert(document.cookie)\" onfoo=\"</div>\n");
@@ -1811,8 +1827,9 @@
 add("selser", "Media link with nasty text [0,[1],2]", "[[Media:Foobar.jpg|Safe 
Link<div style=display:none>\" onmouseover=\"alert(document.cookie)\" 
onfoo=\"</div>]]<div style=display:none>[[Media:Foobar.jpg|\" 
onmouseover=\"alert(document.cookie)\" onfoo=\"]]</div>8jhjz28qyfkwqaor\n");
 add("selser", "Media link with nasty text [4,0,0]", "ztlm95j7w05jc3di<div 
style=display:none>\" onmouseover=\"alert(document.cookie)\" onfoo=\"</div>\n");
 add("selser", "Media link with nasty text [1,0,3]", "[[Media:Foobar.jpg|Safe 
Link<div style=display:none>\" onmouseover=\"alert(document.cookie)\" 
onfoo=\"</div>]]<div style=display:none>\" 
onmouseover=\"alert(document.cookie)\" onfoo=\"</div>");
+add("selser", "Media link with nasty text [[4],[3],2]", "erw8cf8vybonu3di<div 
style=display:none></div>hmljdquaf93pu8fr\n");
 add("selser", "Media link with nasty text [[[3]],[[2]],1]", 
"[[Media:Foobar.jpg|<nowiki/>]]<div 
style=display:none>[[Media:Foobar.jpg|4l6szv69ugix80k9\" 
onmouseover=\"alert(document.cookie)\" onfoo=\"]]</div>\n");
-add("selser", "Media link with nasty text [[2],[3],0]", 
"3buefjw641n8w7b9[[Media:Foobar.jpg|Safe Link<div style=display:none>\" 
onmouseover=\"alert(document.cookie)\" onfoo=\"</div>]]<div 
style=\"display:none\"></div>\n");
+add("selser", "Media link with nasty text [[2],[3],0]", 
"3buefjw641n8w7b9[[Media:Foobar.jpg|Safe Link<div style=display:none>\" 
onmouseover=\"alert(document.cookie)\" onfoo=\"</div>]]<div 
style=display:none></div>\n");
 add("selser", "Media link with nasty text [3,0,0]", "<div 
style=display:none>\" onmouseover=\"alert(document.cookie)\" onfoo=\"</div>\n");
 add("selser", "Media link with nasty text [2,1,1]", 
"q6qorphnrdb49529\n\n[[Media:Foobar.jpg|Safe Link<div style=display:none>\" 
onmouseover=\"alert(document.cookie)\" onfoo=\"</div>]]<div 
style=\"display:none\" data-foobar=\"boskkwf1mpbep14i\">[[Media:Foobar.jpg|Safe 
Link<div style=display:none>\" onmouseover=\"alert(document.cookie)\" 
onfoo=\"</div>]]</div>\n");
 add("selser", "Media link with nasty text [1,4,0]", "[[Media:Foobar.jpg|Safe 
Link<div style=display:none>\" onmouseover=\"alert(document.cookie)\" 
onfoo=\"</div>]]\n\n69bbicqzxqb2zkt9\n");
@@ -1824,10 +1841,12 @@
 add("selser", "Empty attribute crash test single-quotes (bug 2067) [2]", 
"5kxneyilny2gwrk9\n\n<font color=''>foo</font>");
 add("selser", "Empty attribute crash test single-quotes (bug 2067) [[[4]]]", 
"<font color=''>or63pvpg3ooxyldi</font>");
 add("selser", "Empty attribute crash test single-quotes (bug 2067) [[2]]", 
"3338p71nnksrwwmi<font color=''>foo</font>");
+add("selser", "Empty attribute crash test single-quotes (bug 2067) [[[3]]]", 
"<font color=''></font>");
 add("selser", "Attribute test: unquoted but illegal value (hash) [[2]]", 
"auncq77bb1olayvi<font color=#x>foo</font>");
 add("selser", "Attribute test: unquoted but illegal value (hash) [1]", "<font 
color=#x>foo</font>");
 add("selser", "Attribute test: unquoted but illegal value (hash) [[[2]]]", 
"<font color=#x>8b035xwg9khjjorfoo</font>");
 add("selser", "Attribute test: unquoted but illegal value (hash) [2]", 
"fj79gsc42q82rzfr\n\n<font color=#x>foo</font>");
+add("selser", "Attribute test: unquoted but illegal value (hash) [[[3]]]", 
"<font color=#x></font>");
 add("selser", "Attribute test: unquoted but illegal value (hash) [[[4]]]", 
"<font color=#x>svhskrccb8nwb3xr</font>");
 add("selser", "Bug 2095: link with pipe and three closing brackets, version 2 
[1]", "[[Main Page|[http://example.com/]]]";);
 add("selser", "Bug 2095: link with pipe and three closing brackets, version 2 
[2]", "mfl7xqc4xioa8aor\n\n[[Main Page|[http://example.com/]]]";);
@@ -1835,6 +1854,7 @@
 add("selser", "Opera -o-link CSS [[2]]", 
"<div\ntitle=\"&#100;&#97;&#116;&#97;&#58;&#116;&#101;&#120;&#116;&#47;&#104;&#116;&#109;&#108;&#44;&#60;&#105;&#109;&#103;&#32;&#115;&#114;&#99;&#61;&#49;&#32;&#111;&#110;&#101;&#114;&#114;&#111;&#114;&#61;&#97;&#108;&#101;&#114;&#116;&#40;&#49;&#41;&#62;\"\nstyle=\"-o-link:attr(title);-o-link-source:current\">e1v85xt7j899hpviX</div>");
 add("selser", "Opera -o-link CSS [2]", 
"s1oe4611wh035wmi<div\ntitle=\"&#100;&#97;&#116;&#97;&#58;&#116;&#101;&#120;&#116;&#47;&#104;&#116;&#109;&#108;&#44;&#60;&#105;&#109;&#103;&#32;&#115;&#114;&#99;&#61;&#49;&#32;&#111;&#110;&#101;&#114;&#114;&#111;&#114;&#61;&#97;&#108;&#101;&#114;&#116;&#40;&#49;&#41;&#62;\"\nstyle=\"-o-link:attr(title);-o-link-source:current\">X</div>");
 add("selser", "Opera -o-link CSS [[4]]", 
"<div\ntitle=\"&#100;&#97;&#116;&#97;&#58;&#116;&#101;&#120;&#116;&#47;&#104;&#116;&#109;&#108;&#44;&#60;&#105;&#109;&#103;&#32;&#115;&#114;&#99;&#61;&#49;&#32;&#111;&#110;&#101;&#114;&#114;&#111;&#114;&#61;&#97;&#108;&#101;&#114;&#116;&#40;&#49;&#41;&#62;\"\nstyle=\"-o-link:attr(title);-o-link-source:current\">bsf73uag1j9ssjor</div>");
+add("selser", "Opera -o-link CSS [[3]]", 
"<div\ntitle=\"&#100;&#97;&#116;&#97;&#58;&#116;&#101;&#120;&#116;&#47;&#104;&#116;&#109;&#108;&#44;&#60;&#105;&#109;&#103;&#32;&#115;&#114;&#99;&#61;&#49;&#32;&#111;&#110;&#101;&#114;&#114;&#111;&#114;&#61;&#97;&#108;&#101;&#114;&#116;&#40;&#49;&#41;&#62;\"\nstyle=\"-o-link:attr(title);-o-link-source:current\"></div>");
 add("selser", "Table attribute legitimate extension [[0,1]]", "{|\n!+ 
style=\"<nowiki>color:blue</nowiki>\"| status\n|}");
 add("selser", "Table attribute legitimate extension [[0,[1,4]]]", "{|\n!+ 
style=\"<nowiki>color:blue</nowiki>\"| status<!--96xa8rclnmblc8fr-->\n|}");
 add("selser", "Table attribute legitimate extension [2]", 
"ttlfw8y9so9wwmi\n{|\n!+ style=\"<nowiki>color:blue</nowiki>\"| status\n|}");
@@ -1859,11 +1879,14 @@
 add("selser", "Sanitizer: Validating that <meta> and <link> work, but only for 
Microdata [[4,1,0]]", "<div itemscope>spu0tptv3lwka9k9\n<nowiki><meta 
itemprop=\"hello\" content=\"world\"></nowiki>\n\t<nowiki><meta 
http-equiv=\"refresh\" content=\"5\"></nowiki>\n\t<nowiki><meta 
itemprop=\"hello\" http-equiv=\"refresh\" 
content=\"5\"></nowiki>\n\t<nowiki><link itemprop=\"hello\" 
href=\"{{SERVER}}\"></nowiki>\n\t<nowiki><link rel=\"stylesheet\" 
href=\"{{SERVER}}\"></nowiki>\n\t<nowiki><link rel=\"stylesheet\" 
itemprop=\"hello\" href=\"{{SERVER}}\"></nowiki>\n</div>");
 add("selser", "Sanitizer: Validating that <meta> and <link> work, but only for 
Microdata [[4,[3],0]]", "<div itemscope>99wejgddgaybke29\n</div>");
 add("selser", "Sanitizer: Validating that <meta> and <link> work, but only for 
Microdata [[0,0,4]]", "<div itemscope>\n\t<meta itemprop=\"hello\" 
content=\"world\">\n\t<meta http-equiv=\"refresh\" content=\"5\">\n\t<meta 
itemprop=\"hello\" http-equiv=\"refresh\" content=\"5\">\n\t<link 
itemprop=\"hello\" href=\"{{SERVER}}\">\n\t<link rel=\"stylesheet\" 
href=\"{{SERVER}}\">\n\t<link rel=\"stylesheet\" itemprop=\"hello\" 
href=\"{{SERVER}}\">\n\new3jgq2guzhncdi</div>");
+add("selser", "Sanitizer: Validating that <meta> and <link> work, but only for 
Microdata [[0,[4],3]]", "<div itemscope>\n\tsvp5ejek9wqxgvi\n</div>");
+add("selser", "Sanitizer: Validating that <meta> and <link> work, but only for 
Microdata [[0,3,4]]", "<div itemscope>\n\t6mc60dga2a9k9</div>");
 add("selser", "Sanitizer: Validating that <meta> and <link> work, but only for 
Microdata [[2,1,0]]", "<div itemscope>px2m4ecth1qyqfr\n\t<nowiki><meta 
itemprop=\"hello\" content=\"world\"></nowiki>\n\t<nowiki><meta 
http-equiv=\"refresh\" content=\"5\"></nowiki>\n\t<nowiki><meta 
itemprop=\"hello\" http-equiv=\"refresh\" 
content=\"5\"></nowiki>\n\t<nowiki><link itemprop=\"hello\" 
href=\"{{SERVER}}\"></nowiki>\n\t<nowiki><link rel=\"stylesheet\" 
href=\"{{SERVER}}\"></nowiki>\n\t<nowiki><link rel=\"stylesheet\" 
itemprop=\"hello\" href=\"{{SERVER}}\"></nowiki>\n</div>");
 add("selser", "Sanitizer: Validating that <meta> and <link> work, but only for 
Microdata [[0,1,0]]", "<div itemscope>\n\t<nowiki><meta itemprop=\"hello\" 
content=\"world\"></nowiki>\n\t<nowiki><meta http-equiv=\"refresh\" 
content=\"5\"></nowiki>\n\t<nowiki><meta itemprop=\"hello\" 
http-equiv=\"refresh\" content=\"5\"></nowiki>\n\t<nowiki><link 
itemprop=\"hello\" href=\"{{SERVER}}\"></nowiki>\n\t<nowiki><link 
rel=\"stylesheet\" href=\"{{SERVER}}\"></nowiki>\n\t<nowiki><link 
rel=\"stylesheet\" itemprop=\"hello\" href=\"{{SERVER}}\"></nowiki>\n</div>");
 add("selser", "Sanitizer: Validating that <meta> and <link> work, but only for 
Microdata [[0,[2],0]]", "<div itemscope>\n\tx3hbyea8xovtpgb9<nowiki><meta 
itemprop=\"hello\" content=\"world\"></nowiki>\n\t<nowiki><meta 
http-equiv=\"refresh\" content=\"5\"></nowiki>\n\t<nowiki><meta 
itemprop=\"hello\" http-equiv=\"refresh\" 
content=\"5\"></nowiki>\n\t<nowiki><link itemprop=\"hello\" 
href=\"{{SERVER}}\"></nowiki>\n\t<nowiki><link rel=\"stylesheet\" 
href=\"{{SERVER}}\"></nowiki>\n\t<nowiki><link rel=\"stylesheet\" 
itemprop=\"hello\" href=\"{{SERVER}}\"></nowiki>\n</div>");
 add("selser", "Sanitizer: Validating that <meta> and <link> work, but only for 
Microdata [1]", "<div itemscope=\"\" data-foobar=\"q8adwgvp6owjc3di\">\n\t<meta 
itemprop=\"hello\" content=\"world\">\n\t<meta http-equiv=\"refresh\" 
content=\"5\">\n\t<meta itemprop=\"hello\" http-equiv=\"refresh\" 
content=\"5\">\n\t<link itemprop=\"hello\" href=\"{{SERVER}}\">\n\t<link 
rel=\"stylesheet\" href=\"{{SERVER}}\">\n\t<link rel=\"stylesheet\" 
itemprop=\"hello\" href=\"{{SERVER}}\">\n</div>");
 add("selser", "Sanitizer: Validating that <meta> and <link> work, but only for 
Microdata [[2,2,0]]", "<div itemscope>tphlnpjbn019k9\n\tzfr328x4l016pqfr\n<meta 
itemprop=\"hello\" content=\"world\">\n\t<meta http-equiv=\"refresh\" 
content=\"5\">\n\t<meta itemprop=\"hello\" http-equiv=\"refresh\" 
content=\"5\">\n\t<link itemprop=\"hello\" href=\"{{SERVER}}\">\n\t<link 
rel=\"stylesheet\" href=\"{{SERVER}}\">\n\t<link rel=\"stylesheet\" 
itemprop=\"hello\" href=\"{{SERVER}}\">\n</div>");
+add("selser", "Sanitizer: Validating that <meta> and <link> work, but only for 
Microdata [[2,4,0]]", "<div 
itemscope>s813r81cy5y7gb9\n\t4mqkp2v11eeo2yb9\n</div>");
 add("selser", "Sanitizer: Validating that <meta> and <link> work, but only for 
Microdata [[3,0,4]]", "<div itemscope>\n<meta itemprop=\"hello\" 
content=\"world\">\n\t<meta http-equiv=\"refresh\" content=\"5\">\n\t<meta 
itemprop=\"hello\" http-equiv=\"refresh\" content=\"5\">\n\t<link 
itemprop=\"hello\" href=\"{{SERVER}}\">\n\t<link rel=\"stylesheet\" 
href=\"{{SERVER}}\">\n\t<link rel=\"stylesheet\" itemprop=\"hello\" 
href=\"{{SERVER}}\">\naqpwsr7leatyy14i</div>");
 add("selser", "Sanitizer: Validating that <meta> and <link> work, but only for 
Microdata [[0,2,0]]", "<div itemscope>\n\tq21hg5f5s2kxzuxr\n<meta 
itemprop=\"hello\" content=\"world\">\n\t<meta http-equiv=\"refresh\" 
content=\"5\">\n\t<meta itemprop=\"hello\" http-equiv=\"refresh\" 
content=\"5\">\n\t<link itemprop=\"hello\" href=\"{{SERVER}}\">\n\t<link 
rel=\"stylesheet\" href=\"{{SERVER}}\">\n\t<link rel=\"stylesheet\" 
itemprop=\"hello\" href=\"{{SERVER}}\">\n</div>");
 add("selser", "HTML bullet list, closed tags (bug 5497) [[0,0,4,[2],3]]", 
"<ul>\n<li>One</li><li>ab23ovep569io1or</li><li>02xr3ap2i2euq5miTwo</li>\n</ul>");
@@ -1957,6 +1980,7 @@
 add("selser", "Image with page parameter [2]", 
"t1gktsrwi7iizfr\n\n[[File:LoremIpsum.djvu|page=2]]");
 add("selser", "Image with page parameter [1]", 
"[[File:LoremIpsum.djvu|page=2]]");
 add("selser", "Don't fall for the self-closing div [[4]]", 
"<div>f7k96jvehbnmte29</div/>");
+add("selser", "Don't fall for the self-closing div [[3]]", "<div></div/>");
 add("selser", "Don't fall for the self-closing div [2]", 
"03k36yoyy20jatt9<div>hello world</div/>");
 add("selser", "Don't fall for the self-closing div [[2]]", 
"<div>3554xqvubx83erk9hello world</div/>");
 add("selser", "Parsing of overlapping (improperly nested) inline html tags 
[2]", "y9cin9njblr6n7b9\n\n<span><s>x</span></s>");
@@ -1964,6 +1988,7 @@
 add("selser", "Don't break table handling if language converter markup is in 
the cell. [[3,[1,4]]]", "{|\n|- data-foobar=\"lxrh34k2mmoq1tt9\"\n| 
-{R|B}-<!--czk30pw9nitl0udi-->\n|}");
 add("selser", "Don't break table handling if language converter markup is in 
the cell. [[3,[2,3]]]", "{|<!--kvgh4eibaoiggb9-->\n|-\n| -{R|B}-\n|}");
 add("selser", "Don't break table handling if language converter markup is in 
the cell. [[4,2]]", "{|<!--g1hlzg5fl3hrrudi--><!--x4cqrou87inyu8fr-->\n|-\n| 
-{R|B}-\n|}");
+add("selser", "Don't break table handling if language converter markup is in 
the cell. [[0,[[0,[3]],2]]]", "{|\n|-\n| -{R|<!--lhm6u051gyv0wwmi-->\n|}");
 add("selser", "Don't break table handling if language converter markup is in 
the cell. [1]", "{| data-foobar=\"ihw5lexd32uzncdi\"\n|-\n| -{R|B}-\n|}");
 add("selser", "Don't break table handling if language converter markup is in 
the cell. [[4,[[4,0],0]]]", "{|<!--nuhfaguqghc9pb9-->\n|-\n|9qyto9ifqjsxxbt9\n| 
-{R|B}-\n|}");
 add("selser", "Don't break table handling if language converter markup is in 
the cell. [[0,2]]", "{|\n<!--11c9cgnqpuys0pb9-->|-\n| -{R|B}-\n|}");
diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index d5cd013..119c52c 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -26617,7 +26617,8 @@
     [ "#h2", "html", "a\nb\n" ],
     [ "#c1", "html", "a\nb\n" ],
     [ "#c2", "html", "<p>a</p>" ],
-    [ "#c3", "html", "<p>a</p>" ]
+    [ "#c3", "html", "<p>a</p>" ],
+    [ "#c4", "html", "edit-me<p>a</p>" ]
   ]
 }
 !! wikitext
@@ -26631,6 +26632,8 @@
 | id="c2" |edit-me||4
 |-
 | id="c3" |edit-me||p||q||r
+|-
+| id="c4" |edit-me||p||q||r
 |}
 !! wikitext/edited
 {|
@@ -26651,6 +26654,10 @@
 |-
 | id="c3" |a
 |p||q||r
+|-
+| id="c4" |edit-me
+a
+|p||q||r
 |}
 !! end
 

-- 
To view, visit https://gerrit.wikimedia.org/r/326501
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie457e867966865c8774f7ea792a6fc68a85876f8
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry <[email protected]>
Gerrit-Reviewer: Arlolra <[email protected]>
Gerrit-Reviewer: C. Scott Ananian <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to