Arlolra has uploaded a new change for review.
https://gerrit.wikimedia.org/r/281045
Change subject: Remove the broken_template rule
......................................................................
Remove the broken_template rule
* Effectively reverts bb8af723, which predates selser.
* The blacklist changes seem acceptable.
Change-Id: I5fb9092547d0df002260ba04352e3f45e6db96c6
---
M lib/html2wt/DOMHandlers.js
M lib/wt2html/pegTokenizer.pegjs.txt
M tests/parserTests-blacklist.js
M tests/parserTests.txt
4 files changed, 73 insertions(+), 108 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid
refs/changes/45/281045/1
diff --git a/lib/html2wt/DOMHandlers.js b/lib/html2wt/DOMHandlers.js
index cc4609b..4b9eeae 100644
--- a/lib/html2wt/DOMHandlers.js
+++ b/lib/html2wt/DOMHandlers.js
@@ -1090,14 +1090,6 @@
var contentSrc = node.textContent || node.innerHTML;
if (isRecognizedSpanWrapper(type)) {
if (type === 'mw:Nowiki') {
- // src seems to have been added to
nowiki spans for
- // T44353 which looks like it predates
selser. We also
- // seem to added src for self-closed
(currently metas)
- // nowikis to preserve syntactic
variations. Possibly
- // worth dropping for both cases.
- if (dp.src !== undefined && contentSrc
=== dp.src) {
- return emitPlaceholderSrc(node,
state);
- }
state.emitChunk('<nowiki>', node);
return
Promise.reduce(Array.from(node.childNodes), function(_, child) {
if (DU.isElt(child)) {
diff --git a/lib/wt2html/pegTokenizer.pegjs.txt
b/lib/wt2html/pegTokenizer.pegjs.txt
index bc12ec2..6b4fe65 100644
--- a/lib/wt2html/pegTokenizer.pegjs.txt
+++ b/lib/wt2html/pegTokenizer.pegjs.txt
@@ -298,8 +298,7 @@
/ xmlish_tag
/ comment
) { return r; }
- / & '{' r:tplarg_or_template_or_broken { return r; }
- / & '}' r:broken_template { return r; }
+ / & '{' r:tplarg_or_template { return r; }
// FIXME: The php parser's replaceInternalLinks2 splits on [[, resulting
// in sequences with odd number of brackets parsing as text, and sequences
// with even number of brackets having its innermost pair parse as a
@@ -628,18 +627,8 @@
}
/ & { return stops.dec('templatedepth'); }
-tplarg_or_template_or_broken
- = tplarg_or_template / broken_template
-
tplarg_or_template_or_bust "tplarg_or_template_or_bust"
= r:(tplarg_or_template / .)+ { return tu.flattenIfArray(r); }
-
-broken_template
- = v:( '{{' space_or_newline+ '}}' / ( '{{{' / '}}}' / '{{' / '}}' )+ ) {
- return [
- new TagTk('span', [ new KV('typeof', 'mw:Nowiki') ], { tsr:
tsrOffsets('start'), src: text() }),
- ].concat(v, [new EndTagTk('span', [ new KV('typeof', 'mw:Nowiki') ], {
tsr: tsrOffsets('end') }) ]);
- }
template
= "{{" nl_comment_space*
@@ -661,7 +650,7 @@
params.unshift(new KV(tu.flattenIfArray(target.tokens), '',
target.srcOffsets));
var obj = new SelfclosingTagTk('template', params, { tsr: tsrOffsets(),
src: text() });
return obj;
- }
+ } / $('{{' space_or_newline+ '}}')
tplarg
= "{{{"
diff --git a/tests/parserTests-blacklist.js b/tests/parserTests-blacklist.js
index b4d8ac4..d0edd52 100644
--- a/tests/parserTests-blacklist.js
+++ b/tests/parserTests-blacklist.js
@@ -172,7 +172,7 @@
add("wt2html", "Language converter: output gets cut off unexpectedly (bug
5757)", "<p data-parsoid='{\"dsr\":[0,20,0,0]}'>this bit is safe: }-</p>\n\n<p
data-parsoid='{\"dsr\":[22,82,0,0]}'>but if we add a conversion instance:
-{zh-cn:xxx;zh-tw:yyy}-</p>\n\n<p data-parsoid='{\"dsr\":[84,112,0,0]}'>then we
get cut off here: }-</p>\n\n<p data-parsoid='{\"dsr\":[114,145,0,0]}'>all
additional text is vanished</p>");
add("wt2html", "Self closed html pairs (bug 5487)", "<center
data-parsoid='{\"stx\":\"html\",\"dsr\":[0,47,8,9]}'><font id=\"bug\"
data-parsoid='{\"stx\":\"html\",\"selfClose\":true,\"dsr\":[8,25,17,0]}'></font>Centered
text</center>\n<div
data-parsoid='{\"stx\":\"html\",\"dsr\":[48,88,5,6]}'><font id=\"bug2\"
data-parsoid='{\"stx\":\"html\",\"selfClose\":true,\"dsr\":[53,71,18,0]}'></font>In
div text</div>");
add("wt2html", "Fuzz testing: Parser14", "<h2
data-parsoid='{\"dsr\":[0,18,2,2]}'> onmouseover= </h2>\n<p
data-parsoid='{\"dsr\":[19,33,0,0]}'><a rel=\"mw:ExtLink\"
href=\"http://__TOC__\"
data-parsoid='{\"stx\":\"url\",\"dsr\":[19,33,0,0]}'>http://__TOC__</a></p>");
-add("wt2html", "Fuzz testing: Parser24", "<p
data-parsoid='{\"fostered\":true,\"autoInsertedEnd\":true,\"dsr\":[0,0]}'><span
typeof=\"mw:Nowiki\"
data-parsoid='{\"src\":\"{{{\",\"dsr\":[3,6,0,0]}'>{{{</span>|\n<u class=\"|\"
about=\"#mwt2\" typeof=\"mw:ExpandedAttrs\"
data-parsoid='{\"stx\":\"html\",\"a\":{\"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}\":null},\"sa\":{\"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}\":\"\"},\"autoInsertedEnd\":true,\"dsr\":[8,0,74,0]}'
data-mw='{\"attribs\":[[{\"txt\":\"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx-->}}}}\",\"html\":\"{<span
about=\\\"#mwt1\\\" typeof=\\\"mw:Param\\\"
data-parsoid=\\\"{&quot;dsr&quot;:[21,79,null,null],&quot;src&quot;:&quot;{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}&quot;}\\\">{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--&gt;}}}</span>}\"},{\"html\":\"\"}]]}'>\n<br
style=\"onmouseover='alert(document.cookie);' \"
data-parsoid='{\"stx\":\"html\",\"selfClose\":true,\"dsr\":[83,0,53,0]}'/></u></p><p
data-parsoid='{\"fostered\":true,\"autoInsertedEnd\":true,\"dsr\":[0,0]}'><u
class=\"|\" about=\"#mwt2\" typeof=\"mw:ExpandedAttrs\"
data-parsoid='{\"stx\":\"html\",\"a\":{\"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}\":null},\"sa\":{\"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}\":\"\"},\"autoInsertedEnd\":true,\"autoInsertedStart\":true,\"dsr\":[-37,0,0,0]}'
data-mw='{\"attribs\":[[{\"txt\":\"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx-->}}}}\",\"html\":\"{<span
about=\\\"#mwt1\\\" typeof=\\\"mw:Param\\\"
data-parsoid=\\\"{&quot;dsr&quot;:[21,79,null,null],&quot;src&quot;:&quot;{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}&quot;}\\\">{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--&gt;}}}</span>}\"},{\"html\":\"\"}]]}'>MOVE
YOUR MOUSE CURSOR OVER THIS TEXT</u></p><table
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[0,177,2,0]}'>\n\n\n\n<tbody
data-parsoid='{\"dsr\":[176,177,0,0]}'><tr
data-parsoid='{\"autoInsertedEnd\":true,\"autoInsertedStart\":true,\"dsr\":[176,177,0,0]}'><td
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[176,177,1,0]}'></td></tr></tbody></table>");
+add("wt2html", "Fuzz testing: Parser24", "<p
data-parsoid='{\"fostered\":true,\"autoInsertedEnd\":true,\"dsr\":[0,0]}'>{{{|\n<u
class=\"|\" about=\"#mwt2\" typeof=\"mw:ExpandedAttrs\"
data-parsoid='{\"stx\":\"html\",\"a\":{\"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}\":null},\"sa\":{\"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}\":\"\"},\"autoInsertedEnd\":true,\"dsr\":[8,0,74,0]}'
data-mw='{\"attribs\":[[{\"txt\":\"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx-->}}}}\",\"html\":\"{<span
about=\\\"#mwt1\\\" typeof=\\\"mw:Param\\\"
data-parsoid=\\\"{&quot;dsr&quot;:[21,79,null,null],&quot;src&quot;:&quot;{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}&quot;}\\\">{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--&gt;}}}</span>}\"},{\"html\":\"\"}]]}'>\n<br
style=\"onmouseover='alert(document.cookie);' \"
data-parsoid='{\"stx\":\"html\",\"selfClose\":true,\"dsr\":[83,0,53,0]}'/></u></p><p
data-parsoid='{\"fostered\":true,\"autoInsertedEnd\":true,\"dsr\":[0,0]}'><u
class=\"|\" about=\"#mwt2\" typeof=\"mw:ExpandedAttrs\"
data-parsoid='{\"stx\":\"html\",\"a\":{\"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}\":null},\"sa\":{\"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}\":\"\"},\"autoInsertedEnd\":true,\"autoInsertedStart\":true,\"dsr\":[-37,0,0,0]}'
data-mw='{\"attribs\":[[{\"txt\":\"{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx-->}}}}\",\"html\":\"{<span
about=\\\"#mwt1\\\" typeof=\\\"mw:Param\\\"
data-parsoid=\\\"{&quot;dsr&quot;:[21,79,null,null],&quot;src&quot;:&quot;{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}&quot;}\\\">{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--&gt;}}}</span>}\"},{\"html\":\"\"}]]}'>MOVE
YOUR MOUSE CURSOR OVER THIS TEXT</u></p><table
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[0,177,2,0]}'>\n\n\n\n<tbody
data-parsoid='{\"dsr\":[176,177,0,0]}'><tr
data-parsoid='{\"autoInsertedEnd\":true,\"autoInsertedStart\":true,\"dsr\":[176,177,0,0]}'><td
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[176,177,1,0]}'></td></tr></tbody></table>");
add("wt2html", "Fuzz testing: Parser25 (bug 6055)", "<li class=\"\"
about=\"#mwt1\" typeof=\"mw:Param\"
data-parsoid='{\"stx\":\"html\",\"srcTagName\":\"LI\",\"a\":{\"||\":null},\"sa\":{\"||\":\"\"},\"autoInsertedEnd\":true,\"dsr\":[0,110,15,0],\"src\":\"{{{\\n|
\\n<LI CLASS=||\\n >\\n}}}blah\\\" onmouseover=\\\"alert('hello
world');\\\" align=\\\"left\\\"'''MOVE MOUSE CURSOR OVER
HERE\"}'>\n<p data-parsoid='{\"dsr\":[26,110,0,0]}'>blah\"
onmouseover=\"alert('hello world');\" align=\"left\"<b
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[80,110,3,0]}'>MOVE MOUSE
CURSOR OVER HERE</b></p></li>");
add("wt2html", "Inline HTML vs wiki block nesting", "<p
data-parsoid='{\"dsr\":[0,17,0,0]}'><b
data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[0,17,3,0]}'>Bold
paragraph</b></p><b
data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"autoInsertedStart\":true,\"dsr\":[17,37,0,0]}'>\n\n<p
data-parsoid='{\"dsr\":[19,37,0,0]}'>New wiki paragraph</p></b>");
add("wt2html", "Special page transclusion", "<p about=\"#mwt1\"
typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,30,0,0],\"pi\":[[]]}'
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"Special:Prefixindex/Xyzzyx\",\"function\":\"special\"},\"params\":{},\"i\":0}}]}'>Parser
function implementation for pf_special missing in Parsoid.</p>");
@@ -282,8 +282,6 @@
add("wt2html", "Language parser function", "<p about=\"#mwt1\"
typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,16,0,0],\"pi\":[[]]}'
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"#language:ar\",\"function\":\"#language\"},\"params\":{},\"i\":0}}]}'>ar</p>");
add("wt2html", "Special parser function", "<p
data-parsoid='{\"dsr\":[0,65,0,0]}'><span about=\"#mwt1\"
typeof=\"mw:Transclusion\"
data-parsoid='{\"pi\":[[]],\"dsr\":[0,23,null,null]}'
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"#special:RandomPage\",\"function\":\"#special\"},\"params\":{},\"i\":0}}]}'>Parser
function implementation for pf_#special missing in Parsoid.</span>\n<span
about=\"#mwt2\" typeof=\"mw:Transclusion\"
data-parsoid='{\"pi\":[[]],\"dsr\":[24,45,null,null]}'
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"#special:BaDtItLe\",\"function\":\"#special\"},\"params\":{},\"i\":0}}]}'>Parser
function implementation for pf_#special missing in Parsoid.</span>\n<span
about=\"#mwt3\" typeof=\"mw:Transclusion\"
data-parsoid='{\"pi\":[[]],\"dsr\":[46,65,null,null]}'
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"#special:Foobar\",\"function\":\"#special\"},\"params\":{},\"i\":0}}]}'>Parser
function implementation for pf_#special missing in Parsoid.</span></p>");
add("wt2html", "1. SOL-sensitive wikitext tokens as template-args", "<p
data-parsoid='{\"dsr\":[0,35,0,0]}'><span about=\"#mwt1\"
typeof=\"mw:Transclusion\"
data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[0,11,null,null]}'
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"*a\"}},\"i\":0}}]}'>*a</span>\n<span
about=\"#mwt2\" typeof=\"mw:Transclusion\"
data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[12,23,null,null]}'
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"#a\"}},\"i\":0}}]}'>#a</span>\n<span
about=\"#mwt3\" typeof=\"mw:Transclusion\"
data-parsoid='{\"pi\":[[{\"k\":\"1\"}]],\"dsr\":[24,35,null,null]}'
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\":a\"}},\"i\":0}}]}'>:a</span></p>");
-add("wt2html", "2. Parsoid-only: Don't wrap broken template tags in <nowiki>
on wt2wt (Bug 42353)", "<p data-parsoid='{\"dsr\":[0,4,0,0]}'><span
typeof=\"mw:Nowiki\"
data-parsoid='{\"src\":\"{{}}\",\"dsr\":[0,4,0,0]}'>{{}}</span></p>");
-add("wt2html", "1. Parsoid-only: Don't wrap broken template tags in <nowiki>
on wt2wt (Bug 42353)", "<p data-parsoid='{\"dsr\":[0,4,0,0]}'><span
typeof=\"mw:Nowiki\"
data-parsoid='{\"src\":\"}}{{\",\"dsr\":[0,4,0,0]}'>}}{{</span></p>");
add("wt2html", "Empty table rows go away", "<table
data-parsoid='{\"dsr\":[0,39,2,2]}'>\n<tbody
data-parsoid='{\"dsr\":[3,37,0,0]}'><tr
data-parsoid='{\"autoInsertedEnd\":true,\"autoInsertedStart\":true,\"dsr\":[3,18,0,0]}'><td
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[3,10,1,0]}'> Hello</td>\n<td
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[11,18,1,0]}'>
there</td></tr>\n<tr class=\"foo\"
data-parsoid='{\"startTagSrc\":\"|-\",\"autoInsertedEnd\":true,\"dsr\":[19,33,14,0]}'></tr>\n<tr
data-parsoid='{\"startTagSrc\":\"|-\",\"autoInsertedEnd\":true,\"dsr\":[34,36,2,0]}'></tr>\n</tbody></table>");
@@ -322,9 +320,10 @@
add("wt2wt", "Nested lists 3 (first element empty)", "\n**bar\n");
add("wt2wt", "Nested lists 6 (both elements empty)", "\n**\n");
add("wt2wt", "Unbalanced closing non-block tags don't break a list\n(php
parser relies on Tidy to fix up)", "<span>\n*a<span>\n*b");
-add("wt2wt", "Template with invalid target containing tags",
"<nowiki>{{</nowiki>a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a
=b<nowiki>}}</nowiki>\n");
-add("wt2wt", "Template with invalid target containing unclosed tag",
"<nowiki>{{</nowiki>a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a
=b<nowiki>}}</nowiki>\n");
+add("wt2wt", "Template with invalid target containing tags",
"<nowiki>{{a</nowiki><b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}<nowiki>|a
=b}}</nowiki>\n");
+add("wt2wt", "Template with invalid target containing unclosed tag",
"<nowiki>{{a</nowiki><b>|{{echo|foo}}|{{echo|a}}={{echo|b}}<nowiki>|a
=b}}</nowiki>\n");
add("wt2wt", "Template with invalid target containing wikilink",
"<nowiki>{{</nowiki>[[Main Page]]<nowiki>}}</nowiki>\n");
+add("wt2wt", "Template with just whitespace in it, bug #68421", "{{echo|{{
}<nowiki>}</nowiki>}}");
add("wt2wt", "Template with argument in separate line", "{{templateasargtest
|\n templ = simple }}");
add("wt2wt", "BUG 553: link with two variables in a piped link",
"{|\n|[[{{{1}}}<nowiki>|</nowiki>{{{2}}}<nowiki>]]</nowiki>\n|}");
add("wt2wt", "Abort table cell attribute parsing on wikilink", "{|\n| testing
[[one|two]]<nowiki> | three </nowiki>|| four\n| testing one two | three ||
four\n| testing=\"[[one|two]]<nowiki>\" | three </nowiki>|| four\n|}");
@@ -359,7 +358,7 @@
add("wt2wt", "Fuzz testing: Parser16", "{|\n!https://||||||\n|}");
add("wt2wt", "Fuzz testing: Parser21", "{|\n! irc://{{ftp://a\"
onmouseover=\"alert('hello world');\"\n|\n|}");
add("wt2wt", "Fuzz testing: Parser22", "http://===r:::https://b\n\n{|\n|}");
-add("wt2wt", "Fuzz testing: Parser24", "{{{|\n<u class=\"|\"
{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}>\n<br
style=\"onmouseover='alert(document.cookie);' \" />\n\nMOVE YOUR MOUSE CURSOR
OVER THIS TEXT\n{|\n\n|\n|}");
+add("wt2wt", "Fuzz testing: Parser24", "<nowiki>{{{|</nowiki>\n<u class=\"|\"
{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}>\n<br
style=\"onmouseover='alert(document.cookie);' \" />\n\nMOVE YOUR MOUSE CURSOR
OVER THIS TEXT\n{|\n\n|\n|}");
add("wt2wt", "Inline wiki vs wiki block nesting", "'''Bold paragraph'''\n\nNew
wiki paragraph\n");
add("wt2wt", "Mixing markup for italics and bold",
"'<nowiki/>''bold'<nowiki/>'''''bold''bolditalics'''''\n");
add("wt2wt", "Illegal character references (T106578)", "; Null: �\n; FF:
\n; CR: 
\n; Control (low): \n; Control (high):  Ÿ\n;
Surrogate: ��\n; This is an okay astral character: 💩");
@@ -368,6 +367,8 @@
add("wt2wt", "Parsing of overlapping (improperly nested) inline html tags",
"<span><s>x</span>\n");
add("wt2wt", "Don't break table handling if language converter markup is in
the cell.", "{|\n|-\n| -{R |B}-\n|}");
add("wt2wt", "Bug 529: Uncovered bullet leaving empty list, normally removed
by tidy", "******* Foo \n{{bullet}}");
+add("wt2wt", "HHP2.1: Heuristics for headings in preprocessor parenthetical
structures", "<nowiki>{{foo|</nowiki>\n=heading=\n");
+add("wt2wt", "HHP2.2: Heuristics for headings in preprocessor parenthetical
structures", "<nowiki>{{foo|</nowiki>\n==heading==\n");
add("wt2wt", "Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed
external links", "[http://www.example.org/ ideograms]\n");
add("wt2wt", "Ignore pipe between table row attributes", "{|\n| quux\n|-
id=\"foo\" style=\"color: red\" |\n| bar\n|}");
add("wt2wt", "2. Bad treebuilder fixup of formatting elt is cleaned up",
"'''foo'''[[File:Foobar.jpg|thumb|'''caption''']]'''bar'''\n\n<small>[[Image:Foobar.jpg|right|300px]]</small>");
@@ -377,7 +378,7 @@
add("wt2wt", "Ref: 5. body should accept generic wikitext", "A <ref>This is a
'''[[bolded link]]''' and this is a
{{echo|transclusion}}\n</ref>\n\n<references />");
add("wt2wt", "Ref: 6. indent-pres should not be output in ref-body", "A
<ref>foo\n bar\n baz\n</ref>\n\n<references />");
add("wt2wt", "Ref: 7. No p-wrapping in ref-body", "A
<ref>foo\nbar\nbaz\nbooz\n</ref>\n\n<references />");
-add("wt2wt", "Ref: 8. transclusion wikitext has lower precedence", "A <ref>foo
<nowiki>{{</nowiki>echo|</ref> B C}}\n\n<references />");
+add("wt2wt", "Ref: 8. transclusion wikitext has lower precedence", "A
<ref><nowiki>foo {{echo|</nowiki></ref><nowiki> B C}}</nowiki>\n\n<references
/>");
add("wt2wt", "Ref: 9. unclosed comments should not leak out of ref-body", "A
<ref>foo <!----></ref> B C\n<references />");
add("wt2wt", "Ref: 10. Unclosed HTML tags should not leak out of ref-body", "A
<ref><b> foo </ref> B C\n\n<references />");
add("wt2wt", "Ref: 19. ref-tags with identical name encodings should get
identical indexes", "1 <ref name=\"a & b\">foo</ref> 2 <ref name=\"a &amp;
b\" />\n\n<references />");
@@ -462,6 +463,7 @@
add("html2html", "Case-sensitive magic words, when cased differently, should
just be template transclusions", "<p
data-parsoid='{\"dsr\":[0,331,0,0]}'>[/index.php?title=Template:CurrentMonth&action=edit&redlink=1
Template:CurrentMonth]\n[/index.php?title=Template:Currentday&action=edit&redlink=1
Template:Currentday]\n[/index.php?title=Template:CURreNTweEK&action=edit&redlink=1
Template:CURreNTweEK]\n[/index.php?title=Template:CurrentHour&action=edit&redlink=1
Template:CurrentHour]</p>\n");
add("html2html", "Nonexistent template", "<p
data-parsoid='{\"dsr\":[0,108,0,0]}'>[/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1
Template:Thistemplatedoesnotexist]</p>\n");
add("html2html", "Template with invalid target containing wikilink", "<p
data-parsoid='{\"dsr\":[0,17,0,0]}'>{{<a rel=\"mw:WikiLink\"
href=\"./Main_Page\" title=\"Main Page\"
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Main_Page\"},\"sa\":{\"href\":\"Main
Page\"},\"dsr\":[2,15,2,2]}'>Main Page</a>}}</p>\n");
+add("html2html", "Template with just whitespace in it, bug #68421", "<p
data-parsoid='{\"dsr\":[1,31,0,0]}'>{{echo|{{}<span typeof=\"mw:Nowiki\"
data-parsoid='{\"dsr\":[11,29,8,9]}'>}</span>}}</p>");
add("html2html", "Template unnamed parameter", "<p
data-parsoid='{\"dsr\":[0,32,0,0]}'><a rel=\"mw:WikiLink\"
href=\"./Wiki/Main_Page\" title=\"Wiki/Main Page\"
data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Main_Page\"},\"sa\":{\"href\":\"wiki/Main
Page\"},\"dsr\":[0,32,17,2]}'>the main page</a></p>\n");
add("html2html", "Template with complex arguments", "<p
data-parsoid='{\"dsr\":[0,84,0,0]}'><a rel=\"mw:WikiLink\"
href=\"./Wiki/Template:Complextemplate\"
title=\"Wiki/Template:Complextemplate\"
data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Template:Complextemplate\"},\"sa\":{\"href\":\"wiki/Template:Complextemplate\"},\"dsr\":[0,38,32,2]}'>link</a>
This is a test template with parameter (test)</p>\n");
add("html2html", "BUG 553: link with two variables in a piped link", "<table
data-parsoid='{\"dsr\":[0,60,2,2]}'>\n<tbody
data-parsoid='{\"dsr\":[3,58,0,0]}'><tr
data-parsoid='{\"autoInsertedEnd\":true,\"autoInsertedStart\":true,\"dsr\":[3,57,0,0]}'><td
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[3,57,1,0]}'>[[<span
about=\"#mwt1\" typeof=\"mw:Param\"
data-parsoid='{\"dsr\":[6,13,null,null],\"src\":\"{{{1}}}\"}'>{{{1}}}</span><span
typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[13,31,8,9]}'>|</span><span
about=\"#mwt2\" typeof=\"mw:Param\"
data-parsoid='{\"dsr\":[31,38,null,null],\"src\":\"{{{2}}}\"}'>{{{2}}}</span><span
typeof=\"mw:Nowiki\"
data-parsoid='{\"dsr\":[38,57,8,9]}'>]]</span></td></tr>\n</tbody></table>\n");
@@ -546,7 +548,7 @@
add("html2html", "Sanitizer: Validating that <meta> and <link> work, but only
for Microdata", "<div itemscope=\"\"
data-parsoid='{\"stx\":\"html\",\"dsr\":[0,244,18,6]}'>\n\t<p
data-parsoid='{\"dsr\":[20,141,0,0]}'><meta itemprop=\"hello\"
content=\"world\" />\n\t<meta http-equiv=\"refresh\"
content=\"5\">\n\t<meta itemprop=\"hello\" content=\"5\" /></p>\n\n\t<p
data-parsoid='{\"dsr\":[144,237,0,0]}'><a rel=\"mw:ExtLink\"
href=\"http://example.org\"
data-parsoid='{\"targetOff\":163,\"contentOffsets\":[163,163],\"dsr\":[144,164,19,1]}'></a>\n\t<link
rel=\"stylesheet\" href=\"http://example.org\">\n\t<a rel=\"mw:ExtLink\"
href=\"http://example.org\"
data-parsoid='{\"targetOff\":236,\"contentOffsets\":[236,236],\"dsr\":[217,237,19,1]}'></a></p>\n</div>\n");
add("html2html", "HTML ordered list item with parameters oddity", "<ol
data-parsoid='{\"dsr\":[0,5,0,0]}'><li data-parsoid='{\"dsr\":[0,5,1,0]}'>
One</li></ol>\n");
add("html2html", "Fuzz testing: Parser14", "<h2
data-parsoid='{\"dsr\":[0,18,2,2]}'> onmouseover= </h2>\n<p
data-parsoid='{\"dsr\":[19,26,0,0]}'>http://</p>\n<div id=\"toc\" class=\"toc\"
data-parsoid='{\"stx\":\"html\",\"dsr\":[27,201,26,6]}'>\n<div id=\"toctitle\"
data-parsoid='{\"stx\":\"html\",\"dsr\":[54,95,19,6]}'>\n<h2
data-parsoid='{\"dsr\":[74,88,2,2]}'> Contents </h2>\n</div>\n\n<ul
data-parsoid='{\"dsr\":[97,193,0,0]}'><li
data-parsoid='{\"dsr\":[97,193,1,0]}'> <a rel=\"mw:WikiLink\"
href=\"./Main%20Page#onmouseover.3D\"
data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main%20Page#onmouseover.3D\"},\"sa\":{\"href\":\"#onmouseover.3D\"},\"dsr\":[99,193,18,2]}'><span
class=\"tocnumber\"
data-parsoid='{\"stx\":\"html\",\"dsr\":[117,149,24,7]}'>1</span> <span
class=\"toctext\"
data-parsoid='{\"stx\":\"html\",\"dsr\":[150,191,22,7]}'>onmouseover=</span></a></li></ul>\n\n</div>\n");
-add("html2html", "Fuzz testing: Parser24", "\n<p
data-parsoid='{\"dsr\":[1,64,0,0]}'><span typeof=\"mw:Nowiki\"
data-parsoid='{\"dsr\":[1,21,8,9]}'>{{{</span>|\n<u class=\"|\"
data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[23,64,13,0]}'><span
typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[36,56,8,9]}'>}}}</span>} >\n<br
data-parsoid='{\"stx\":\"html\",\"noClose\":true,\"dsr\":[60,64,4,null]}'/></u></p>\n\n<p
data-parsoid='{\"dsr\":[66,108,0,0]}'><u class=\"|\"
data-parsoid='{\"stx\":\"html\",\"autoInsertedStart\":true,\"dsr\":[66,108,0,4]}'>MOVE
YOUR MOUSE CURSOR OVER THIS TEXT\n</u></p>\n<table
data-parsoid='{\"dsr\":[109,117,2,2]}'>\n<tbody
data-parsoid='{\"dsr\":[112,115,0,0]}'><tr
data-parsoid='{\"autoInsertedEnd\":true,\"autoInsertedStart\":true,\"dsr\":[112,113,0,0]}'><td
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[112,113,1,0]}'></td></tr>\n\n</tbody></table>\n<p
data-parsoid='{\"dsr\":[118,135,0,0]}'><u class=\"|\"
data-parsoid='{\"stx\":\"html\",\"dsr\":[118,135,13,4]}'></u></p>");
+add("html2html", "Fuzz testing: Parser24", "\n<p
data-parsoid='{\"dsr\":[1,64,0,0]}'><span typeof=\"mw:Nowiki\"
data-parsoid='{\"dsr\":[1,22,8,9]}'>{{{|</span>\n<u class=\"|\"
data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[23,64,13,0]}'><span
typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[36,59,8,9]}'>}}}} ></span>\n<br
data-parsoid='{\"stx\":\"html\",\"noClose\":true,\"dsr\":[60,64,4,null]}'/></u></p>\n\n<p
data-parsoid='{\"dsr\":[66,108,0,0]}'><u class=\"|\"
data-parsoid='{\"stx\":\"html\",\"autoInsertedStart\":true,\"dsr\":[66,108,0,4]}'>MOVE
YOUR MOUSE CURSOR OVER THIS TEXT\n</u></p>\n<table
data-parsoid='{\"dsr\":[109,117,2,2]}'>\n<tbody
data-parsoid='{\"dsr\":[112,115,0,0]}'><tr
data-parsoid='{\"autoInsertedEnd\":true,\"autoInsertedStart\":true,\"dsr\":[112,113,0,0]}'><td
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[112,113,1,0]}'></td></tr>\n\n</tbody></table>\n<p
data-parsoid='{\"dsr\":[118,135,0,0]}'><u class=\"|\"
data-parsoid='{\"stx\":\"html\",\"dsr\":[118,135,13,4]}'></u></p>");
add("html2html", "Fuzz testing: encoded newline in generated HTML replacements
(bug 6577)", " \n");
add("html2html", "Special page transclusion", "<ul
data-parsoid='{\"dsr\":[0,24,0,0]}'><li data-parsoid='{\"dsr\":[0,24,1,0]}'> <a
rel=\"mw:WikiLink\" href=\"./Wiki/Xyzzyx\" title=\"Wiki/Xyzzyx\"
data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Xyzzyx\"},\"sa\":{\"href\":\"wiki/Xyzzyx\"},\"dsr\":[2,24,14,2]}'>Xyzzyx</a></li></ul>\n");
add("html2html", "Special page transclusion twice (bug 5021)", "<ul
data-parsoid='{\"dsr\":[0,24,0,0]}'><li data-parsoid='{\"dsr\":[0,24,1,0]}'> <a
rel=\"mw:WikiLink\" href=\"./Wiki/Xyzzyx\" title=\"Wiki/Xyzzyx\"
data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Xyzzyx\"},\"sa\":{\"href\":\"wiki/Xyzzyx\"},\"dsr\":[2,24,14,2]}'>Xyzzyx</a></li></ul>\n\n<ul
data-parsoid='{\"dsr\":[26,50,0,0]}'><li data-parsoid='{\"dsr\":[26,50,1,0]}'>
<a rel=\"mw:WikiLink\" href=\"./Wiki/Xyzzyx\" title=\"Wiki/Xyzzyx\"
data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Xyzzyx\"},\"sa\":{\"href\":\"wiki/Xyzzyx\"},\"dsr\":[28,50,14,2]}'>Xyzzyx</a></li></ul>\n");
@@ -613,12 +615,11 @@
add("html2html", "Gallery override link with absolute external link (bug
34852)", "<p data-parsoid='{\"dsr\":[0,4,0,0]}'>\t\t* </p><div style=\"width:
155px\" data-parsoid='{\"stx\":\"html\",\"dsr\":[4,239,26,6]}'> \t\t\t<div
class=\"thumb\" style=\"width: 150px;\"
data-parsoid='{\"stx\":\"html\",\"dsr\":[34,182,41,6]}'><div
style=\"margin:68px auto;\"
data-parsoid='{\"stx\":\"html\",\"dsr\":[75,176,31,6]}'><img
src=\"http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg\"
alt=\"120px-Foobar.jpg\" rel=\"mw:externalImage\"
data-parsoid='{\"dsr\":[106,170,null,null]}'/></div></div> \t\t\t<div
class=\"gallerytext\" data-parsoid='{\"stx\":\"html\",\"dsr\":[186,230,25,6]}'>
caption \t\t\t</div> \t\t</div>\n");
add("html2html", "Gallery override link with malicious javascript (bug
34852)", "<p data-parsoid='{\"dsr\":[0,4,0,0]}'>\t\t* </p><div style=\"width:
155px\" data-parsoid='{\"stx\":\"html\",\"dsr\":[4,239,26,6]}'> \t\t\t<div
class=\"thumb\" style=\"width: 150px;\"
data-parsoid='{\"stx\":\"html\",\"dsr\":[34,182,41,6]}'><div
style=\"margin:68px auto;\"
data-parsoid='{\"stx\":\"html\",\"dsr\":[75,176,31,6]}'><img
src=\"http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg\"
alt=\"120px-Foobar.jpg\" rel=\"mw:externalImage\"
data-parsoid='{\"dsr\":[106,170,null,null]}'/></div></div> \t\t\t<div
class=\"gallerytext\" data-parsoid='{\"stx\":\"html\",\"dsr\":[186,230,25,6]}'>
caption \t\t\t</div> \t\t</div>\n");
add("html2html", "Gallery with invalid title as link (bug 43964)", "<p
data-parsoid='{\"dsr\":[0,4,0,0]}'>\t\t* </p><div style=\"width: 155px\"
data-parsoid='{\"stx\":\"html\",\"dsr\":[4,229,26,6]}'> \t\t\t<div
class=\"thumb\" style=\"width: 150px;\"
data-parsoid='{\"stx\":\"html\",\"dsr\":[34,182,41,6]}'><div
style=\"margin:68px auto;\"
data-parsoid='{\"stx\":\"html\",\"dsr\":[75,176,31,6]}'><img
src=\"http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg\"
alt=\"120px-Foobar.jpg\" rel=\"mw:externalImage\"
data-parsoid='{\"dsr\":[106,170,null,null]}'/></div></div> \t\t\t<div
class=\"gallerytext\"
data-parsoid='{\"stx\":\"html\",\"dsr\":[186,220,25,6]}'>\t\t\t</div>
\t\t</div>\n");
+add("html2html", "Ref: 8. transclusion wikitext has lower precedence", "<p
data-parsoid='{\"dsr\":[0,64,0,0]}'>A <span about=\"#mwt2\" class=\"mw-ref\"
id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Extension/ref\"
data-parsoid='{\"dsr\":[2,41,5,6]}'
data-mw='{\"name\":\"ref\",\"body\":{\"id\":\"mw-reference-text-cite_note-1\"},\"attrs\":{}}'><a
href=\"#cite_note-1\" style=\"counter-reset: mw-Ref 1;\"><span
class=\"mw-reflink-text\">[1]</span></a></span><span typeof=\"mw:Nowiki\"
data-parsoid='{\"dsr\":[41,64,8,9]}'> B C}}</span></p>\n<ol
class=\"mw-references\" typeof=\"mw:Extension/references\" about=\"#mwt4\"
data-parsoid='{\"dsr\":[65,79,2,2]}'
data-mw='{\"name\":\"references\",\"attrs\":{}}'><li about=\"#cite_note-1\"
id=\"cite_note-1\"><a href=\"#cite_ref-1\" rel=\"mw:referencedBy\"><span
class=\"mw-linkback-text\">↑ </span></a> <span
id=\"mw-reference-text-cite_note-1\" class=\"mw-reference-text\"
data-parsoid=\"{}\">foo {{echo|</span></li></ol>");
add("html2html", "Ref: 19. ref-tags with identical name encodings should get
identical indexes", "<p data-parsoid='{\"dsr\":[0,60,0,0]}'>1 <span
about=\"#mwt3\" class=\"mw-ref\" id=\"cite_ref-a_.26_b_1-0\"
rel=\"dc:references\" typeof=\"mw:Extension/ref\"
data-parsoid='{\"dsr\":[2,29,18,6]}'
data-mw='{\"name\":\"ref\",\"body\":{\"id\":\"mw-reference-text-cite_note-a_.26_b-1\"},\"attrs\":{\"name\":\"a
& b\"}}'><a href=\"#cite_note-a_.26_b-1\" style=\"counter-reset: mw-Ref
1;\"><span class=\"mw-reflink-text\">[1]</span></a></span> 2 <span
about=\"#mwt4\" class=\"mw-ref\" id=\"cite_ref-a_.26amp.3B_b_2-0\"
rel=\"dc:references\" typeof=\"mw:Extension/ref\"
data-parsoid='{\"dsr\":[32,60,28,0]}'
data-mw='{\"name\":\"ref\",\"attrs\":{\"name\":\"a &amp;amp; b\"}}'><a
href=\"#cite_note-a_.26amp.3B_b-2\" style=\"counter-reset: mw-Ref 2;\"><span
class=\"mw-reflink-text\">[2]</span></a></span></p>\n\n<ol
class=\"mw-references\" typeof=\"mw:Extension/references\" about=\"#mwt6\"
data-parsoid='{\"dsr\":[62,76,2,2]}'
data-mw='{\"name\":\"references\",\"attrs\":{}}'><li
about=\"#cite_note-a_.26_b-1\" id=\"cite_note-a_.26_b-1\"><a
href=\"#cite_ref-a_.26_b_1-0\" rel=\"mw:referencedBy\"><span
class=\"mw-linkback-text\">↑ </span></a> <span
id=\"mw-reference-text-cite_note-a_.26_b-1\" class=\"mw-reference-text\"
data-parsoid=\"{}\">foo</span></li><li about=\"#cite_note-a_.26amp.3B_b-2\"
id=\"cite_note-a_.26amp.3B_b-2\"><a href=\"#cite_ref-a_.26amp.3B_b_2-0\"
rel=\"mw:referencedBy\"><span class=\"mw-linkback-text\">↑ </span></a> <span
id=\"mw-reference-text-cite_note-a_.26amp.3B_b-2\" class=\"mw-reference-text\"
data-parsoid=\"{}\"></span></li></ol>");
add("html2html", "References: 9. Generate missing references list at the end",
"<p data-parsoid='{\"dsr\":[0,52,0,0]}'>A <span about=\"#mwt3\"
class=\"mw-ref\" id=\"cite_ref-1\" rel=\"dc:references\"
typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[2,16,5,6]}'
data-mw='{\"name\":\"ref\",\"body\":{\"id\":\"mw-reference-text-cite_note-1\"},\"attrs\":{}}'><a
href=\"#cite_note-1\" style=\"counter-reset: mw-Ref 1;\"><span
class=\"mw-reflink-text\">[1]</span></a></span> B <span about=\"#mwt4\"
class=\"mw-ref\" id=\"cite_ref-2\" rel=\"dc:references\"
typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[19,52,24,6]}'
data-mw='{\"name\":\"ref\",\"body\":{\"id\":\"mw-reference-text-cite_note-2\"},\"attrs\":{\"group\":\"inexistent\"}}'><a
href=\"#cite_note-2\" style=\"counter-reset: mw-Ref 1;\"
data-mw-group=\"inexistent\"><span class=\"mw-reflink-text\">[inexistent
1]</span></a></span></p>\n<ol class=\"mw-references\"
typeof=\"mw:Extension/references\" about=\"#mwt6\"
data-parsoid='{\"dsr\":[53,67,2,2]}'
data-mw='{\"name\":\"references\",\"attrs\":{}}'><li about=\"#cite_note-1\"
id=\"cite_note-1\"><a href=\"#cite_ref-1\" rel=\"mw:referencedBy\"><span
class=\"mw-linkback-text\">↑ </span></a> <span
id=\"mw-reference-text-cite_note-1\" class=\"mw-reference-text\"
data-parsoid=\"{}\">foo</span></li></ol>\n<ol class=\"mw-references\"
typeof=\"mw:Extension/references\" about=\"#mwt8\" data-mw-group=\"inexistent\"
data-parsoid='{\"group\":\"inexistent\",\"dsr\":[68,101,2,2]}'
data-mw='{\"name\":\"references\",\"attrs\":{\"group\":\"inexistent\"}}'><li
about=\"#cite_note-2\" id=\"cite_note-2\"><a href=\"#cite_ref-2\"
data-mw-group=\"inexistent\" rel=\"mw:referencedBy\"><span
class=\"mw-linkback-text\">↑ </span></a> <span
id=\"mw-reference-text-cite_note-2\" class=\"mw-reference-text\"
data-parsoid=\"{}\">bar</span></li></ol>");
add("html2html", "Entities in ref name", "<p
data-parsoid='{\"dsr\":[0,38,0,0]}'><span about=\"#mwt2\" class=\"mw-ref\"
id=\"cite_ref-test_.26amp.3B_me_1-0\" rel=\"dc:references\"
typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[0,38,30,6]}'
data-mw='{\"name\":\"ref\",\"body\":{\"id\":\"mw-reference-text-cite_note-test_.26amp.3B_me-1\"},\"attrs\":{\"name\":\"test
&amp;amp; me\"}}'><a href=\"#cite_note-test_.26amp.3B_me-1\"
style=\"counter-reset: mw-Ref 1;\"><span
class=\"mw-reflink-text\">[1]</span></a></span></p>\n<ol
class=\"mw-references\" typeof=\"mw:Extension/references\" about=\"#mwt4\"
data-parsoid='{\"dsr\":[39,53,2,2]}'
data-mw='{\"name\":\"references\",\"attrs\":{}}'><li
about=\"#cite_note-test_.26amp.3B_me-1\"
id=\"cite_note-test_.26amp.3B_me-1\"><a
href=\"#cite_ref-test_.26amp.3B_me_1-0\" rel=\"mw:referencedBy\"><span
class=\"mw-linkback-text\">↑ </span></a> <span
id=\"mw-reference-text-cite_note-test_.26amp.3B_me-1\"
class=\"mw-reference-text\" data-parsoid=\"{}\">hi</span></li></ol>");
add("html2html", "Empty LI and TR nodes should not be stripped from top-level
content", "<ul data-parsoid='{\"dsr\":[0,9,0,0]}'><li
data-parsoid='{\"dsr\":[0,3,1,0]}'> a</li>\n<li
data-parsoid='{\"dsr\":[4,5,1,0]}'></li>\n<li
data-parsoid='{\"dsr\":[6,9,1,0]}'> b</li></ul>\n\n<table
data-parsoid='{\"dsr\":[11,26,2,2]}'>\n\n<tbody
data-parsoid='{\"dsr\":[15,24,0,0]}'><tr
data-parsoid='{\"startTagSrc\":\"|-\",\"autoInsertedEnd\":true,\"dsr\":[15,22,2,0]}'>\n<td
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[18,22,1,0]}'>foo</td></tr>\n\n</tbody></table>\n");
-add("html2html", "2. Parsoid-only: Don't wrap broken template tags in <nowiki>
on wt2wt (Bug 42353)", "<p data-parsoid='{\"dsr\":[0,21,0,0]}'><span
typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[0,21,8,9]}'>{{}}</span></p>");
-add("html2html", "1. Parsoid-only: Don't wrap broken template tags in <nowiki>
on wt2wt (Bug 42353)", "<p data-parsoid='{\"dsr\":[0,21,0,0]}'><span
typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[0,21,8,9]}'>}}{{</span></p>");
add("html2html", "Empty TR followed by a template-generated TR", "<table
data-parsoid='{\"dsr\":[0,37,2,2]}'>\n\n<tbody about=\"#mwt1\"
typeof=\"mw:Transclusion\"
data-parsoid='{\"dsr\":[4,35,0,0],\"pi\":[[{\"k\":\"1\"}]]}'
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"<tr><td>foo</td></tr>\"}},\"i\":0}},\"\\n\"]}'><tr><td>foo</td></tr>\n</tbody></table>\n");
add("html2html", "Empty TR followed by mixed-ws-comment line should RT
correctly", "<table data-parsoid='{\"dsr\":[0,37,2,2]}'>\n\n\n <!--c--><tbody
data-parsoid='{\"dsr\":[14,35,0,0]}'><tr
data-parsoid='{\"startTagSrc\":\"|-\",\"autoInsertedEnd\":true,\"dsr\":[14,26,2,0]}'>\n<!--c-->
</tr><!--d-->\n</tbody></table>\n");
add("html2html", "T73074: More fostering fun", "<link
rel=\"mw:PageProp/Category\" href=\"./Category:Two\"
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Category:Two\"},\"sa\":{\"href\":\"Category:Two\"},\"dsr\":[0,16,null,null]}'/>\n<p
data-parsoid='{\"fostered\":true,\"autoInsertedEnd\":true,\"autoInsertedStart\":true,\"dsr\":[17,17]}'><tbody></p><link
rel=\"mw:PageProp/Category\" href=\"./Category:Two\"
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Category:Two\"},\"sa\":{\"href\":\"Category:Two\"},\"fostered\":true,\"dsr\":[17,17]}'/><p
data-parsoid='{\"fostered\":true,\"autoInsertedEnd\":true,\"autoInsertedStart\":true,\"dsr\":[17,17]}'></tbody></p><table
data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[17,85,7,0]}'><tbody
data-parsoid='{\"dsr\":[24,85,0,0]}'><tr
data-parsoid='{\"autoInsertedEnd\":true,\"autoInsertedStart\":true,\"dsr\":[24,40,0,0]}'><td
data-parsoid='{\"stx\":\"html\",\"dsr\":[31,40,4,5]}'></td></tr><tr
about=\"#mwt1\" typeof=\"mw:Transclusion\"
data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[40,85,null,0],\"pi\":[[{\"k\":\"1\"}]]}'
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"<tr>\"}},\"i\":0}},\"<!--c-->[[Category:Two]]</tbody>\"]}'><!--c--></tr></tbody></table>");
@@ -907,8 +908,9 @@
add("html2wt", "Namespace (lang=de) Benutzer Diskussion {{ns:3}}", "Benutzer
Diskussion\n");
add("html2wt", "Urlencode",
"hi+world%3F%21\nhi_world%3F!\nhi%20world%3F%21\nhi+world%3F%21\n");
add("html2wt", "Nonexistent template",
"[/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1
Template:Thistemplatedoesnotexist]\n");
-add("html2wt", "Template with invalid target containing tags",
"<nowiki>{{</nowiki>a'''b'''|foo|a=b|a = b<nowiki>}}</nowiki>\n");
-add("html2wt", "Template with invalid target containing unclosed tag",
"<nowiki>{{</nowiki>a'''|foo|a=b|a = b<nowiki>}}</nowiki>'''\n");
+add("html2wt", "Template with invalid target containing tags",
"<nowiki>{{a</nowiki>'''b'''<nowiki>|foo|a=b|a = b}}</nowiki>\n");
+add("html2wt", "Template with invalid target containing unclosed tag",
"<nowiki>{{a</nowiki>'''<nowiki>|foo|a=b|a = b}}</nowiki>'''\n");
+add("html2wt", "Template with just whitespace in it, bug #68421", "{{echo|{{
}<nowiki>}</nowiki>}}");
add("html2wt", "Simple template", "This is a test template\n");
add("html2wt", "Template with explicit namespace", "This is a test
template\n");
add("html2wt", "Template parameter", "This is a test template with parameter
foo\n");
@@ -1121,7 +1123,7 @@
add("html2wt", "Fuzz testing: Parser16", "{|\n\n!https://\n!\n!\n!\n\n|}\n");
add("html2wt", "Fuzz testing: Parser21", "{|\n\n! irc://{{ftp://a\"
onmouseover=\"alert('hello world');\"\n\n|\n\n|}\n");
add("html2wt", "Fuzz testing: Parser22",
"http://===r:::https://b\n\n{|\n|\n|}\n");
-add("html2wt", "Fuzz testing: Parser24", "\n<nowiki>{{{</nowiki>|\n<u
class=\"|\"><nowiki>}}}</nowiki>} >\n<br>\n\nMOVE YOUR MOUSE CURSOR OVER THIS
TEXT\n</u>\n{|\n|\n\n|}\n<u class=\"|\"></u>");
+add("html2wt", "Fuzz testing: Parser24", "\n<nowiki>{{{|</nowiki>\n<u
class=\"|\"><nowiki>}}}} ></nowiki>\n<br>\n\nMOVE YOUR MOUSE CURSOR OVER THIS
TEXT\n</u>\n{|\n|\n\n|}\n<u class=\"|\"></u>");
add("html2wt", "Fuzz testing: Parser25 (bug 6055)", "<LI CLASS=blah\"
onmouseover=\"alert('hello world');\" align=\"left\"'''MOVE MOUSE CURSOR OVER
HERE'''\n");
add("html2wt", "Fuzz testing: encoded newline in generated HTML replacements
(bug 6577)", " \n");
add("html2wt", "Parsing optional HTML elements (Bug 6171)", "{|\n \n |
Some tabular data\n | More tabular data ...\n | And yet som tabular
data\n \n|}\n");
@@ -1226,8 +1228,8 @@
add("html2wt", "Bug 5678: Double-parsed template invocation",
"<nowiki>{{paramtest | param = hello }}</nowiki>\n");
add("html2wt", "Case insensitivity of parser functions for non-ASCII
characters (bug 8143)", "Ěščř\nĚščř\něščř\něščř\něščř\něščř\nĚŠČŘ\nĚŠČŘ\n");
add("html2wt", "Morwen/13: Unclosed link followed by heading", "[[link\n\n==
heading ==\n");
-add("html2wt", "HHP2.1: Heuristics for headings in preprocessor parenthetical
structures", "<nowiki>{{</nowiki>foo|\n\n= heading =\n");
-add("html2wt", "HHP2.2: Heuristics for headings in preprocessor parenthetical
structures", "<nowiki>{{</nowiki>foo|\n\n== heading ==\n");
+add("html2wt", "HHP2.1: Heuristics for headings in preprocessor parenthetical
structures", "<nowiki>{{foo|</nowiki>\n\n= heading =\n");
+add("html2wt", "HHP2.2: Heuristics for headings in preprocessor parenthetical
structures", "<nowiki>{{foo|</nowiki>\n\n== heading ==\n");
add("html2wt", "Paragraphs inside divs (no extra line breaks)", "<div>Line
one\nLine two</div>\n");
add("html2wt", "Paragraphs inside divs (extra line break on close)",
"<div>Line one\nLine two\n\n</div>\n");
add("html2wt", "Paragraphs inside divs (extra line break on open and close)",
"<div>\nLine one\n\nLine two\n\n</div>\n");
@@ -1291,7 +1293,7 @@
add("html2wt", "Ref: 5. body should accept generic wikitext", "A <ref>This is
a '''[[bolded link]]''' and this is a
{{echo|transclusion}}\n</ref>\n\n<references />");
add("html2wt", "Ref: 6. indent-pres should not be output in ref-body", "A
<ref>foo\n bar\n baz\n</ref>\n\n<references />");
add("html2wt", "Ref: 7. No p-wrapping in ref-body", "A
<ref>foo\nbar\nbaz\nbooz\n</ref>\n\n<references />");
-add("html2wt", "Ref: 8. transclusion wikitext has lower precedence", "A
<ref>foo <nowiki>{{</nowiki>echo|</ref> B C<nowiki>}}</nowiki>\n<references
/>");
+add("html2wt", "Ref: 8. transclusion wikitext has lower precedence", "A
<ref><nowiki>foo {{echo|</nowiki></ref><nowiki> B C}}</nowiki>\n<references
/>");
add("html2wt", "Ref: 9. unclosed comments should not leak out of ref-body", "A
<ref>foo <!----></ref> B C\n<references />");
add("html2wt", "Ref: 10. Unclosed HTML tags should not leak out of ref-body",
"A <ref><b> foo </ref> B C\n\n<references />");
add("html2wt", "Ref: 19. ref-tags with identical name encodings should get
identical indexes", "1 <ref name=\"a & b\">foo</ref> 2 <ref name=\"a &amp;
b\" />\n\n<references />");
@@ -1302,8 +1304,6 @@
add("html2wt", "HRs: 1. Single line", "--------\n----=foo=\n----*foo");
add("html2wt", "3. Leading whitespace in indent-pre suppressing contexts
should not be escaped", "<blockquote>\n\n a\n <span>b</span>\n
c\n</blockquote>");
add("html2wt", "HTML tag with 'unnecessary' entity encoding in attributes",
"<span title=\"&\">foo</span>\n");
-add("html2wt", "2. Parsoid-only: Don't wrap broken template tags in <nowiki>
on wt2wt (Bug 42353)", "<nowiki>{{}}</nowiki>");
-add("html2wt", "1. Parsoid-only: Don't wrap broken template tags in <nowiki>
on wt2wt (Bug 42353)", "<nowiki>}}{{</nowiki>");
add("html2wt", "Accept empty td cell attribute", "{|\n\n| align=\"center\" |
foo \n|\n|}\n");
add("html2wt", "Non-empty attributes in th-cells", "{|\n\n! Foo \n!
style=\"color: red\" | Bar\n|}\n");
add("html2wt", "Accept empty attributes in th-cells", "{|\n\n! foo \n!
bar\n|}\n");
@@ -1662,26 +1662,26 @@
add("selser", "Template with invalid target containing tags [2]",
"ki3gc6j34165stt9\n\n{{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}");
add("selser", "Template with invalid target containing tags
[[3,3,3,0,4,0,2,0,0]]",
"{{echo|foo}}jauo06zjihi1kyb9{{echo|a}}9h10iqritlwvobt9={{echo|b}}|a =b}}");
add("selser", "Template with invalid target containing tags
[[3,[4],2,0,0,0,3,0,0]]",
"<b>5q0b9wq3qgu5l8fr</b>gs6mp3pt36vibe29|{{echo|foo}}|{{echo|a}}{{echo|b}}|a
=b}}");
-add("selser", "Template with invalid target containing tags [1]",
"<nowiki>{{</nowiki>a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a =b}}");
-add("selser", "Template with invalid target containing tags
[[2,[2],4,0,2,0,0,0,0]]",
"39bd8s5z5cw0cnmi<nowiki>{{</nowiki>a<b>7k1tfg6lot1brzfrb</b>lri8gc4zecmr6bt9{{echo|foo}}5m3n5xzvi6893sor|{{echo|a}}={{echo|b}}|a
=b}}");
-add("selser", "Template with invalid target containing tags
[[0,[2],2,0,0,0,3,0,0]]",
"<nowiki>{{</nowiki>a<b>dny163izhm9xjemib</b>ogbwlk7h7di5p14i|{{echo|foo}}|{{echo|a}}{{echo|b}}|a
=b}}");
-add("selser", "Template with invalid target containing tags
[[0,2,0,0,0,0,4,0,0]]",
"<nowiki>{{</nowiki>a9doy5ksflltprpb9<b>b</b>|{{echo|foo}}|{{echo|a}}zsy6zc95znyfzuxr{{echo|b}}|a
=b}}");
-add("selser", "Template with invalid target containing tags
[[2,0,0,0,4,0,0,0,0]]",
"xu2vb4mmpkhgp66r<nowiki>{{</nowiki>a<b>b</b>|{{echo|foo}}78hbshfbw6pw4s4i{{echo|a}}={{echo|b}}|a
=b}}");
-add("selser", "Template with invalid target containing tags
[[0,0,4,0,0,0,0,0,0]]",
"<nowiki>{{</nowiki>a<b>b</b>lvadzdcjhmcs1yvi{{echo|foo}}|{{echo|a}}={{echo|b}}|a
=b}}");
+add("selser", "Template with invalid target containing tags [1]",
"<nowiki>{{a</nowiki><b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a =b}}");
+add("selser", "Template with invalid target containing tags
[[2,[2],4,0,2,0,0,0,0]]",
"<nowiki>39bd8s5z5cw0cnmi{{a</nowiki><b>7k1tfg6lot1brzfrb</b>lri8gc4zecmr6bt9{{echo|foo}}5m3n5xzvi6893sor|{{echo|a}}={{echo|b}}|a
=b}}");
+add("selser", "Template with invalid target containing tags
[[0,[2],2,0,0,0,3,0,0]]",
"<nowiki>{{a</nowiki><b>dny163izhm9xjemib</b>ogbwlk7h7di5p14i|{{echo|foo}}|{{echo|a}}{{echo|b}}|a
=b}}");
+add("selser", "Template with invalid target containing tags
[[0,2,0,0,0,0,4,0,0]]",
"<nowiki>{{a9doy5ksflltprpb9</nowiki><b>b</b>|{{echo|foo}}|{{echo|a}}zsy6zc95znyfzuxr{{echo|b}}|a
=b}}");
+add("selser", "Template with invalid target containing tags
[[2,0,0,0,4,0,0,0,0]]",
"<nowiki>xu2vb4mmpkhgp66r{{a</nowiki><b>b</b>|{{echo|foo}}78hbshfbw6pw4s4i{{echo|a}}={{echo|b}}|a
=b}}");
+add("selser", "Template with invalid target containing tags
[[0,0,4,0,0,0,0,0,0]]",
"<nowiki>{{a</nowiki><b>b</b>lvadzdcjhmcs1yvi{{echo|foo}}|{{echo|a}}={{echo|b}}|a
=b}}");
add("selser", "Template with invalid target containing tags
[[4,1,0,0,4,0,3,0,0]]", "05laxsak396swcdi<b
data-foobar=\"q4h81dcojfc4n29\">b</b>|{{echo|foo}}vr4d4w51gvnp14i{{echo|a}}{{echo|b}}|a
=b}}");
-add("selser", "Template with invalid target containing unclosed tag [1]",
"<nowiki>{{</nowiki>a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}");
-add("selser", "Template with invalid target containing unclosed tag [[0,1]]",
"<nowiki>{{</nowiki>a<b
data-foobar=\"ah4i6emv4j6pqfr\">|{{echo|foo}}|{{echo|a}}={{echo|b}}|a =b}}");
+add("selser", "Template with invalid target containing unclosed tag [1]",
"<nowiki>{{a</nowiki><b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}");
+add("selser", "Template with invalid target containing unclosed tag [[0,1]]",
"<nowiki>{{a</nowiki><b
data-foobar=\"ah4i6emv4j6pqfr\">|{{echo|foo}}|{{echo|a}}={{echo|b}}|a =b}}");
add("selser", "Template with invalid target containing unclosed tag [[4,2]]",
"d7d6vni91sfez5mio7di35eq9ubd42t9<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a =
b}}");
add("selser", "Template with invalid target containing unclosed tag
[[3,[0,0,4,0,3,0,0]]]", "<b>|{{echo|foo}}f3j5exmxvo0f6r{{echo|a}}{{echo|b}}|a
=b}}");
-add("selser", "Template with invalid target containing unclosed tag
[[0,[4,0,0,0,3,0,0]]]",
"<nowiki>{{</nowiki>a<b>n6rra5yl19i442t9{{echo|foo}}|{{echo|a}}{{echo|b}}|a
=b}}");
+add("selser", "Template with invalid target containing unclosed tag
[[0,[4,0,0,0,3,0,0]]]",
"<nowiki>{{a</nowiki><b>n6rra5yl19i442t9{{echo|foo}}|{{echo|a}}{{echo|b}}|a
=b}}");
add("selser", "Template with invalid target containing unclosed tag
[[3,[4,0,0,0,0,0,0]]]",
"<b>98je9r0hl43u9pb9{{echo|foo}}|{{echo|a}}={{echo|b}}|a =b}}");
add("selser", "Template with invalid target containing unclosed tag [2]",
"n9yqgp0xjbf647vi\n\n{{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}");
-add("selser", "Template with invalid target containing unclosed tag
[[0,[3,0,0,0,2,0,0]]]",
"<nowiki>{{</nowiki>a<b>{{echo|foo}}|{{echo|a}}w3curdi6jgrdx6r={{echo|b}}|a
=b}}");
-add("selser", "Template with invalid target containing unclosed tag [[2,2]]",
"bbplai8we7j2x1or<nowiki>{{</nowiki>apfbr2blkhz146lxr<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a
= b}}");
+add("selser", "Template with invalid target containing unclosed tag
[[0,[3,0,0,0,2,0,0]]]",
"<nowiki>{{a</nowiki><b>{{echo|foo}}|{{echo|a}}w3curdi6jgrdx6r={{echo|b}}|a
=b}}");
+add("selser", "Template with invalid target containing unclosed tag [[2,2]]",
"<nowiki>bbplai8we7j2x1or{{apfbr2blkhz146lxr</nowiki><b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a
= b}}");
add("selser", "Template with invalid target containing wikilink [2]",
"zwc4e5r9fcz93sor\n\n{{[[Main Page]]}}");
add("selser", "Template with invalid target containing wikilink [1]",
"<nowiki>{{</nowiki>[[Main Page]]}}");
add("selser", "Template with invalid target containing wikilink [[3,0,0]]",
"[[Main Page]]}}");
-add("selser", "Template with invalid target containing wikilink [[2,0,0]]",
"oqfrkey46zaaif6r<nowiki>{{</nowiki>[[Main Page]]}}");
+add("selser", "Template with invalid target containing wikilink [[2,0,0]]",
"<nowiki>oqfrkey46zaaif6r{{</nowiki>[[Main Page]]}}");
add("selser", "Template with invalid target containing wikilink [[0,[2],0]]",
"<nowiki>{{</nowiki>[[Main Page|g5dbrx85rnt57b9Main Page]]}}");
add("selser", "Template with invalid target containing wikilink [[4,2,0]]",
"gb2u86grtumu0udigposn6eyae154s4i[[Main Page]]}}");
add("selser", "Template with invalid target containing wikilink [[3,[4],0]]",
"[[Main Page|hah73egswvf2mx6r]]}}");
@@ -1702,16 +1702,16 @@
add("selser", "Abort table cell attribute parsing on wikilink [[0,2]]",
"{|\n<!--l7obo7dbpflmcxr-->| testing [[one|two]] | three || four\n| testing one
two | three || four\n| testing=\"[[one|two]]\" | three || four\n|}");
add("selser", "Abort table cell attribute parsing on wikilink
[[4,[[2,[2],4,3,2,4,[3,4,4],1],0]]]",
"{|<!--w2ugfafj2x83erk9-->\n|18az3ae320dlsor\n| testing [[one|two]] | three
||icotw6yeh7x2yb9 four\n|w2ux7qtgctyb9\n|g1zrrcwd5kqn0zfr||
four\n|p8xffhgo254gqfr\n|std1xusl1ndvlsorwrsl542ys0vpwrk9||
data-foobar=\"2r11xivrxnbl0udi\" | four\n|}");
add("selser", "Template with targets containing wikilinks [4,0,1,2,1]",
"p8pza9iyg3yaxlxr\n\n<nowiki>{{</nowiki>[[{{echo|foo}}]]}}\n\ndf60zk0z1v8ia4i\n\n{{{{echo|[[foo}}]]}}");
-add("selser", "Template with targets containing wikilinks
[[2,1,0],0,[0,0,2],0,0]",
"h2hv5x8klgom9529<nowiki>{{</nowiki>[[foo]]}}\n\n<nowiki>{{</nowiki>[[{{echo|foo}}]]<nowiki/>ncfzvzzr3mzpvi<nowiki>}}</nowiki>\n\n{{{{echo|[[foo}}]]}}");
+add("selser", "Template with targets containing wikilinks
[[2,1,0],0,[0,0,2],0,0]",
"<nowiki>h2hv5x8klgom9529{{</nowiki>[[foo]]}}\n\n<nowiki>{{</nowiki>[[{{echo|foo}}]]<nowiki>ncfzvzzr3mzpvi}}</nowiki>\n\n{{{{echo|[[foo}}]]}}");
add("selser", "Template with targets containing wikilinks [0,3,2,0,2]",
"{{[[foo]]}}\n\n8rx6djpk76ojq0k9\n\n{{[[{{echo|foo}}]]}}\n\n5oa9tnlujuivn29\n\n{{{{echo|[[foo}}]]}}");
add("selser", "Template with targets containing wikilinks [4,3,1,3,4]",
"tj6nwlghdk5ljtt9\n\n<nowiki>{{</nowiki>[[{{echo|foo}}]]}}\n\nz57gp6q7znuvunmi\n");
add("selser", "Template with targets containing wikilinks [[4,0,4],0,1,2,4]",
"340gvnbe2k7nl8fr[[foo]]<nowiki/>s33i9adwhcd9ggb9\n\n<nowiki>{{</nowiki>[[{{echo|foo}}]]}}\n\ny20i831f0qkt9\n\nbj9cw1q9ft6b6gvi\n");
-add("selser", "Template with targets containing wikilinks [[2,0,2],3,1,0,4]",
"10ghh1t5f8ddkj4i<nowiki>{{</nowiki>[[foo]]86q8c3ty61l6usor<nowiki>}}</nowiki>\n\n<nowiki>{{</nowiki>[[{{echo|foo}}]]}}\n\n52q3lpdqrn7sc3di\n");
+add("selser", "Template with targets containing wikilinks [[2,0,2],3,1,0,4]",
"<nowiki>10ghh1t5f8ddkj4i{{</nowiki>[[foo]]<nowiki>86q8c3ty61l6usor}}</nowiki>\n\n<nowiki>{{</nowiki>[[{{echo|foo}}]]}}\n\n52q3lpdqrn7sc3di\n");
add("selser", "Template with targets containing wikilinks
[[0,[3],0],0,0,2,2]",
"<nowiki>{{</nowiki>[[foo|<nowiki/>]]}}\n\n{{[[{{echo|foo}}]]}}\n\n1z50cb7dcf28olxr\n\n1ituto223xxenrk9\n\n{{{{echo|[[foo}}]]}}");
-add("selser", "Template with targets containing wikilinks [[0,2,0],0,2,0,0]",
"<nowiki>{{</nowiki>htu2qmdkzjkedn29[[foo]]}}\n\nfejf3xvsleopqfr\n\n{{[[{{echo|foo}}]]}}\n\n{{{{echo|[[foo}}]]}}");
+add("selser", "Template with targets containing wikilinks [[0,2,0],0,2,0,0]",
"<nowiki>{{htu2qmdkzjkedn29</nowiki>[[foo]]}}\n\nfejf3xvsleopqfr\n\n{{[[{{echo|foo}}]]}}\n\n{{{{echo|[[foo}}]]}}");
add("selser", "Template with targets containing wikilinks [1,4,0,2,0]",
"<nowiki>{{</nowiki>[[foo]]}}\n\n1cd1vr2c1t9be29\n\n{{[[{{echo|foo}}]]}}\n\nkjsr70qifjx4unmi\n\n{{{{echo|[[foo}}]]}}");
add("selser", "Template with targets containing wikilinks [3,0,1,0,4]",
"\n<nowiki>{{</nowiki>[[{{echo|foo}}]]}}\n\nnjip1d7tubz6ko6r\n");
-add("selser", "Template with targets containing wikilinks [[3,4,0],0,2,0,3]",
"25jsxi33dblc8fr<nowiki>}}</nowiki>\n\nxo4f2m9ziaawnrk9\n\n{{[[{{echo|foo}}]]}}\n");
+add("selser", "Template with targets containing wikilinks [[3,4,0],0,2,0,3]",
"<nowiki>25jsxi33dblc8fr}}</nowiki>\n\nxo4f2m9ziaawnrk9\n\n{{[[{{echo|foo}}]]}}\n");
add("selser", "Template with targets containing wikilinks [2,0,[4,0,3],0,0]",
"jwj1clvcmw5qaor\n\n{{[[foo]]}}\n\na6sabnbx8xueg66r[[{{echo|foo}}]]\n\n{{{{echo|[[foo}}]]}}");
add("selser", "Template with targets containing wikilinks [2,3,2,0,0]",
"jn3l3gn2shlac3di\n\n{{[[foo]]}}\n\neps1xdvsq62vgqfr\n\n{{[[{{echo|foo}}]]}}\n\n{{{{echo|[[foo}}]]}}");
add("selser", "2. includeonly in html attr value [[0,3,0]]", "<span
id=\"<noinclude>v1</noinclude><includeonly>v2</includeonly>\">bar</span><span
id=<noinclude>\"v1\"</noinclude><includeonly>\"v2\"</includeonly>>bar</span>");
@@ -1934,26 +1934,23 @@
add("selser", "Fuzz testing: Parser22 [[1],4,2]",
"http://===r:::https://b\n\nptlivvbl2mg3nmi\n\noxiqusjba1wqm2t9\n{|");
add("selser", "Fuzz testing: Parser22 [3,0,0]", "\n{|");
add("selser", "Fuzz testing: Parser22 [1,0,2]",
"http://===r:::https://b\n\n3ql477um4peyu8fr\n{|");
-add("selser", "Fuzz testing: Parser24 [[0,2,0],3,2]",
"{{{g6r38jevgd37hkt9|\n<u class=\"|\"
{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}>\n<br
style=\"onmouseover='alert(document.cookie);' \"
/>\n\n7yitay7jtsjdcxr\n{|\n{{{|\n<u CLASS=\n|
{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >\n<br
style=\"onmouseover='alert(document.cookie);' \" />\n\nMOVE YOUR MOUSE CURSOR
OVER THIS TEXT\n|");
-add("selser", "Fuzz testing: Parser24 [[[4],3,0],0,[0,3]]",
"<nowiki>aosym28xh3ibpgb9</nowiki><u class=\"|\"
{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}>\n<br
style=\"onmouseover='alert(document.cookie);' \" />{|\n\n|}");
-add("selser", "Fuzz testing: Parser24 [1,3,1]", "{{{|\n<u class=\"|\"
{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}>\n<br
style=\"onmouseover='alert(document.cookie);' \" />\n{|
data-foobar=\"6fgt6dvgb9j7zaor\"\n\n||}");
-add("selser", "Fuzz testing: Parser24 [[4,0,0],0,[4,[1]]]",
"11sr1z4igrvpwrk9|\n<u class=\"|\"
{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}>\n<br
style=\"onmouseover='alert(document.cookie);' \"
/>{|<!--smnv2ch56iy919k9-->\n||}");
+add("selser", "Fuzz testing: Parser24 [0,0,1]", "{|
data-foobar=\"g6r38jevgd37hkt9\"\n\n||}");
+add("selser", "Fuzz testing: Parser24 [0,4,3]", "\n\naosym28xh3ibpgb9\n");
+add("selser", "Fuzz testing: Parser24 [1,3,1]", "<nowiki>{{{|</nowiki>\n<u
class=\"|\" {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}>\n<br
style=\"onmouseover='alert(document.cookie);' \" />\n{|
data-foobar=\"6fgt6dvgb9j7zaor\"\n\n||}");
+add("selser", "Fuzz testing: Parser24 [[4,0],0,[0,3]]", "11sr1z4igrvpwrk9<u
class=\"|\" {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}>\n<br
style=\"onmouseover='alert(document.cookie);' \" />{|\n\n|}");
add("selser", "Fuzz testing: Parser24 [3,2,4]",
"u39lbr4wb5ptlnmi\n\n\n\nng2zinxre265hfr\n");
-add("selser", "Fuzz testing: Parser24 [[2,4,0],3,1]",
"05fmnodtnjfnipb9{{{wcunbgauo7uv7vi<u class=\"|\"
{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}>\n<br
style=\"onmouseover='alert(document.cookie);' \" />\n{|
data-foobar=\"yddsdri9li110pb9\"\n\n||}");
-add("selser", "Fuzz testing: Parser24 [[[3],0,0],2,3]",
"<nowiki></nowiki>|\n<u class=\"|\"
{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}>\n<br
style=\"onmouseover='alert(document.cookie);' \" />\n\naruqvd6sv8bvgqfr\n\n\n");
+add("selser", "Fuzz testing: Parser24 [0,3,[2,3]]",
"\n{|<!--aruqvd6sv8bvgqfr-->\n\n|}");
add("selser", "Fuzz testing: Parser24 [4,4,[2,1]]",
"u2mgcfdhu9d7k3xr\n\nt2gfu2pam7vi\n{|<!--wl9sr7uggvjf9a4i-->\n\n||}");
-add("selser", "Fuzz testing: Parser24 [[3,0,0],0,1]", "|\n<u class=\"|\"
{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}>\n<br
style=\"onmouseover='alert(document.cookie);' \" />{|
data-foobar=\"gvuyg42a70y3c8fr\"\n\n||}");
+add("selser", "Fuzz testing: Parser24 [[3,0],0,[2,3]]", "<u class=\"|\"
{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}>\n<br
style=\"onmouseover='alert(document.cookie);' \"
/>{|<!--gvuyg42a70y3c8fr-->\n\n|}");
add("selser", "Fuzz testing: Parser24 [2,4,[0,2]]",
"zp55fn0uhjrio1or\n\n\n\nbywvnpoau9za1yvi\n{|\n\n<!--zezekrjhlor2uik9-->||}");
-add("selser", "Fuzz testing: Parser24 [0,2,0]",
"\n\n78ok5mnhx8icz0k9\n\n{|\n{{{|\n<u CLASS=\n|
{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >\n<br
style=\"onmouseover='alert(document.cookie);' \" />\n\nMOVE YOUR MOUSE CURSOR
OVER THIS TEXT\n|");
-add("selser", "Fuzz testing: Parser24 [[1,0,0],0,3]", "{{{|\n<u class=\"|\"
{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}>\n<br
style=\"onmouseover='alert(document.cookie);' \" />\n");
-add("selser", "Fuzz testing: Parser24 [1,2,[0,[3]]]", "{{{|\n<u class=\"|\"
{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}>\n<br
style=\"onmouseover='alert(document.cookie);' \"
/>\n\n2ee2y1k6jblkrzfr\n\n{|\n\n|}");
+add("selser", "Fuzz testing: Parser24 [0,0,[2,0]]",
"{|<!--78ok5mnhx8icz0k9-->\n\n||}");
+add("selser", "Fuzz testing: Parser24 [[2,0],0,[3,[3]]]",
"<nowiki>9c088ry7flmcxr{{{|</nowiki>\n<u class=\"|\"
{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}>\n<br
style=\"onmouseover='alert(document.cookie);' \" />{|\n|}");
+add("selser", "Fuzz testing: Parser24 [1,2,[0,[3]]]",
"<nowiki>{{{|</nowiki>\n<u class=\"|\"
{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}>\n<br
style=\"onmouseover='alert(document.cookie);' \"
/>\n\n2ee2y1k6jblkrzfr\n\n{|\n\n|}");
add("selser", "Fuzz testing: Parser24 [3,0,1]", "MOVE YOUR MOUSE CURSOR OVER
THIS TEXT\n{| data-foobar=\"vpeg0ehvafijatt9\"\n\n||}");
-add("selser", "Fuzz testing: Parser24 [[2,4,0],0,3]",
"2h96h5bmgi2lz0k9{{{7nrcllfxlygmn29<u class=\"|\"
{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}>\n<br
style=\"onmouseover='alert(document.cookie);' \" />\n");
add("selser", "Fuzz testing: Parser24 [4,4,[3,[2]]]",
"vtpmggos1rxm9529\n\ntg1e2avwggbymn29\n{|<!--yi16pa7w3cv7vi-->\n||}");
-add("selser", "Fuzz testing: Parser24 [[1,2,0],2,3]",
"{{{6xvikssdmi4zehfr|\n<u class=\"|\"
{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}>\n<br
style=\"onmouseover='alert(document.cookie);' \" />\n\nwvwpzfhipqqfflxr\n\n\n");
-add("selser", "Fuzz testing: Parser24 [[1,2,0],0,4]",
"{{{sk3rl6utosgojemi|\n<u class=\"|\"
{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}>\n<br
style=\"onmouseover='alert(document.cookie);' \" />\n\n\n\njzny1t7i47mygb9\n");
-add("selser", "Fuzz testing: Parser24 [[4,3,0],3,1]", "ajjrvymgwee45cdi<u
class=\"|\" {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}>\n<br
style=\"onmouseover='alert(document.cookie);' \" />\n{|
data-foobar=\"q3u36zzq1lg3z0k9\"\n\n||}");
-add("selser", "Fuzz testing: Parser24 [1,1,2]", "{{{|\n<u class=\"|\"
{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}>\n<br
style=\"onmouseover='alert(document.cookie);' \" />\n\nMOVE YOUR MOUSE CURSOR
OVER THIS TEXT\n\nwo1ljwyi3jlzbyb9\n{|\n{{{|\n<u CLASS=\n|
{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >\n<br
style=\"onmouseover='alert(document.cookie);' \" />\n\nMOVE YOUR MOUSE CURSOR
OVER THIS TEXT\n|");
+add("selser", "Fuzz testing: Parser24 [[2,0],1,2]",
"<nowiki>948zfqhejm8l4n29{{{|</nowiki>\n<u class=\"|\"
{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}>\n<br
style=\"onmouseover='alert(document.cookie);' \" />\n\nMOVE YOUR MOUSE CURSOR
OVER THIS TEXT\n\nwvwpzfhipqqfflxr\n{|\n{{{|\n<u CLASS=\n|
{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >\n<br
style=\"onmouseover='alert(document.cookie);' \" />\n\nMOVE YOUR MOUSE CURSOR
OVER THIS TEXT\n|");
+add("selser", "Fuzz testing: Parser24 [[2,0],2,[4,[2]]]",
"<nowiki>hndosskzwiiwl8fr{{{|</nowiki>\n<u class=\"|\"
{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}>\n<br
style=\"onmouseover='alert(document.cookie);' \"
/>\n\nsk3rl6utosgojemi\n\n{|<!--jzny1t7i47mygb9--><!--8oeybhmbp7lanhfr-->\n||}");
+add("selser", "Fuzz testing: Parser24 [1,1,2]", "<nowiki>{{{|</nowiki>\n<u
class=\"|\" {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}}>\n<br
style=\"onmouseover='alert(document.cookie);' \" />\n\nMOVE YOUR MOUSE CURSOR
OVER THIS TEXT\n\nwo1ljwyi3jlzbyb9\n{|\n{{{|\n<u CLASS=\n|
{{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >\n<br
style=\"onmouseover='alert(document.cookie);' \" />\n\nMOVE YOUR MOUSE CURSOR
OVER THIS TEXT\n|");
add("selser", "Inline wiki vs wiki block nesting [2,0,1]",
"y31p21pdfplgcik9\n\n'''Bold paragraph\n\nNew wiki paragraph");
add("selser", "Inline wiki vs wiki block nesting [1,3,[3]]", "'''Bold
paragraph\n");
add("selser", "Inline wiki vs wiki block nesting [0,0,4]", "'''Bold
paragraph\n\n1vaanv1vlmtb7qfr\n");
@@ -2008,6 +2005,14 @@
add("selser", "Bug 529: Uncovered bullet leaving empty list, normally removed
by tidy [[[[[[3]]]],0]]", "**{{bullet}}");
add("selser", "Bug 529: Uncovered bullet leaving empty list, normally removed
by tidy [[[[2]],0]]", "** y0slrsmmchjxxbt9\n******* Foo {{bullet}}");
add("selser", "Bug 529: Uncovered bullet leaving empty list, normally removed
by tidy [[[[[[[4]]]]],0]]", "***u5i7s9pdlw8w7b9{{bullet}}");
+add("selser", "HHP2.1: Heuristics for headings in preprocessor parenthetical
structures [0,2,4]", "{{foo|\n\n2l1t9h2tgp41v2t9\n\npiz397o23x7s0pb9\n");
+add("selser", "HHP2.1: Heuristics for headings in preprocessor parenthetical
structures [0,4,2]",
"{{foo|\n\ndb6sww3y8vxcg14i\n\ndagfwhcu6jl15rk9\n\n=heading=");
+add("selser", "HHP2.1: Heuristics for headings in preprocessor parenthetical
structures [0,4,[4]]", "{{foo|\n\n0a2q6c6bfi1i3sor\n\n=gqmq0sr1mjz6w29=");
+add("selser", "HHP2.2: Heuristics for headings in preprocessor parenthetical
structures [0,4,3]", "{{foo|\n\nhwsy55rncbpxecdi\n");
+add("selser", "HHP2.2: Heuristics for headings in preprocessor parenthetical
structures [0,4,2]",
"{{foo|\n\n9q382r4ehmvaemi\n\n4o8sjnsym8to6r\n\n==heading==");
+add("selser", "HHP2.2: Heuristics for headings in preprocessor parenthetical
structures [0,3,[4]]", "{{foo|\n==7s3wx1l0g4x6r==");
+add("selser", "HHP2.2: Heuristics for headings in preprocessor parenthetical
structures [0,0,3]", "{{foo|\n");
+add("selser", "HHP2.2: Heuristics for headings in preprocessor parenthetical
structures [0,0,[4]]", "{{foo|\n==935b3adg8a7nwmi==");
add("selser", "Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed
external links [2]", "l0v2g46g9ipgy14i\n\n[http://www.example.org/ ideograms]");
add("selser", "Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed
external links [1]", "[http://www.example.org/ ideograms]");
add("selser", "Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed
external links [[2]]", "ersk3465d2rtqpvi[http://www.example.org/ ideograms]");
@@ -2125,23 +2130,22 @@
add("selser", "Ref: 7. No p-wrapping in ref-body [[2,0],4,0]",
"34x1kftp6cg14iA
<ref>\nfoo\n\nbar\n\n\nbaz\n\n\n\nbooz\n</ref>\n\ngoqdfok6qfvzehfr<references
/>");
add("selser", "Ref: 7. No p-wrapping in ref-body [[4,0],4,0]",
"tewmryhpf1bxogvi<ref>\nfoo\n\nbar\n\n\nbaz\n\n\n\nbooz\n</ref>\n\n287sw295wn17zaor<references
/>");
add("selser", "Ref: 7. No p-wrapping in ref-body [[3,0],3,0]",
"<ref>\nfoo\n\nbar\n\n\nbaz\n\n\n\nbooz\n</ref><references />");
-add("selser", "Ref: 8. transclusion wikitext has lower precedence
[[3,0,0,[2]],0,0]", "<ref> foo {{echo|</ref> B
C<nowiki>cuv87u78i1kyb9}}</nowiki>\n\n<references />");
+add("selser", "Ref: 8. transclusion wikitext has lower precedence
[[3,0,0],0,0]", "<ref> foo {{echo|</ref> B C}}\n\n<references />");
+add("selser", "Ref: 8. transclusion wikitext has lower precedence [0,2,0]", "A
<ref> foo {{echo|</ref> B C}}\n\nbugprygirpe3ik9\n\n<references />");
+add("selser", "Ref: 8. transclusion wikitext has lower precedence
[[0,0,2],2,0]", "A <ref> foo {{echo|</ref><nowiki>5nkeu8bfbog06bt9 B
C}}</nowiki>\n\n5378fuaj7nwmi\n\n<references />");
+add("selser", "Ref: 8. transclusion wikitext has lower precedence [1,4,0]", "A
<ref> foo {{echo|</ref> B C}}\n\nfc744f1ddc5zh0k9<references />");
add("selser", "Ref: 8. transclusion wikitext has lower precedence [0,3,0]", "A
<ref> foo {{echo|</ref> B C}}<references />");
-add("selser", "Ref: 8. transclusion wikitext has lower precedence
[[0,0,0,1],0,0]", "A <ref> foo {{echo|</ref> B C}}\n\n<references />");
-add("selser", "Ref: 8. transclusion wikitext has lower precedence
[[0,0,2,1],3,0]", "A <ref> foo {{echo|</ref>5nkeu8bfbog06bt9 B C}}<references
/>");
-add("selser", "Ref: 8. transclusion wikitext has lower precedence
[[0,0,0,[2]],4,0]", "A <ref> foo {{echo|</ref> B
C<nowiki>4906wuz1hhjs8aor}}</nowiki>\n\nfc744f1ddc5zh0k9<references />");
-add("selser", "Ref: 8. transclusion wikitext has lower precedence
[[0,0,0,2],2,0]", "A <ref> foo {{echo|</ref> B
Cdhgm17wf65abgldi}}\n\nt5h5r7w3j9vn29\n\n<references />");
-add("selser", "Ref: 8. transclusion wikitext has lower precedence
[[2,0,0,0],0,0]", "0xr2nac5pztwqaorA <ref> foo {{echo|</ref> B
C}}\n\n<references />");
-add("selser", "Ref: 8. transclusion wikitext has lower precedence
[[2,0,4,0],2,0]", "8xs9gemyg9nc23xrA <ref> foo
{{echo|</ref>klhu6j5nxparwwmi}}\n\nr2b4j4rnlba9k9\n\n<references />");
-add("selser", "Ref: 8. transclusion wikitext has lower precedence
[[0,0,0,4],2,0]", "A <ref> foo {{echo|</ref> B
Cvdm4ccld6aq3erk9\n\nk7nw1kt1jaotuik9\n\n<references />");
-add("selser", "Ref: 8. transclusion wikitext has lower precedence [0,4,0]", "A
<ref> foo {{echo|</ref> B C}}\n\n7na9u57xsprb2o6r<references />");
+add("selser", "Ref: 8. transclusion wikitext has lower precedence
[[2,0,0],0,0]", "0xr2nac5pztwqaorA <ref> foo {{echo|</ref> B C}}\n\n<references
/>");
+add("selser", "Ref: 8. transclusion wikitext has lower precedence
[[2,0,4],0,0]", "8xs9gemyg9nc23xrA <ref> foo
{{echo|</ref>klhu6j5nxparwwmi\n\n<references />");
+add("selser", "Ref: 8. transclusion wikitext has lower precedence [0,4,0]", "A
<ref> foo {{echo|</ref> B C}}\n\nvdm4ccld6aq3erk9<references />");
+add("selser", "Ref: 8. transclusion wikitext has lower precedence
[[4,0,3],4,0]", "7na9u57xsprb2o6r<ref> foo
{{echo|</ref>\n\ngp86hqynhmovquxr<references />");
add("selser", "Ref: 8. transclusion wikitext has lower precedence [1,0,0]", "A
<ref> foo {{echo|</ref> B C}}\n\n<references />");
-add("selser", "Ref: 8. transclusion wikitext has lower precedence
[[3,0,0,2],0,0]", "<ref> foo {{echo|</ref> B Cfhyq1oah4n9daemi}}\n\n<references
/>");
-add("selser", "Ref: 8. transclusion wikitext has lower precedence
[[4,0,2,2],0,0]", "839ue3zrnclbx1or<ref> foo {{echo|</ref>5k7094p8ve4gqfr B
Cslg3e0w3bb5ljtt9}}\n\n<references />");
+add("selser", "Ref: 8. transclusion wikitext has lower precedence
[[3,0,0],2,0]", "<ref> foo {{echo|</ref> B
C}}\n\nfhyq1oah4n9daemi\n\n<references />");
+add("selser", "Ref: 8. transclusion wikitext has lower precedence
[[4,0,2],3,0]", "839ue3zrnclbx1or<ref> foo {{echo|</ref><nowiki>5k7094p8ve4gqfr
B C}}</nowiki><references />");
add("selser", "Ref: 8. transclusion wikitext has lower precedence [2,0,0]",
"ny3t8o4lcg39dx6r\n\nA <ref> foo {{echo|</ref> B C}}\n\n<references />");
-add("selser", "Ref: 8. transclusion wikitext has lower precedence
[[2,0,0,1],3,0]", "3zedmyrzf9don7b9A <ref> foo {{echo|</ref> B C}}<references
/>");
-add("selser", "Ref: 8. transclusion wikitext has lower precedence
[[0,0,4,4],0,0]", "A <ref> foo
{{echo|</ref>yv1uetyp3ynqxgvibep2v1t3tyugzaor\n\n<references />");
-add("selser", "Ref: 8. transclusion wikitext has lower precedence
[[4,0,2,4],2,0]", "5967hka94mrkke29<ref> foo {{echo|</ref>4xuj8pifdagrdx6r B
Cs0j38kel7db1emi\n\nzyoazm0bqyrv0a4i\n\n<references />");
+add("selser", "Ref: 8. transclusion wikitext has lower precedence
[[2,0,0],2,0]", "3zedmyrzf9don7b9A <ref> foo {{echo|</ref> B
C}}\n\nxzksp1lwlubu766r\n\n<references />");
+add("selser", "Ref: 8. transclusion wikitext has lower precedence
[[0,0,4],4,0]", "A <ref> foo
{{echo|</ref>yv1uetyp3ynqxgvi\n\nbep2v1t3tyugzaor<references />");
+add("selser", "Ref: 8. transclusion wikitext has lower precedence
[[4,0,2],4,0]", "5967hka94mrkke29<ref> foo
{{echo|</ref><nowiki>4xuj8pifdagrdx6r B
C}}</nowiki>\n\ns0j38kel7db1emi<references />");
add("selser", "Ref: 9. unclosed comments should not leak out of ref-body
[2,3,0]", "lxg9r6yz398xs9k9\n\nA <ref> foo <!--</ref> B C<references />");
add("selser", "Ref: 9. unclosed comments should not leak out of ref-body
[[4,0,0],4,0]", "ecjktuor793eg66r<ref> foo <!--</ref> B
C\n\n8lwxeybnzep9o1or<references />");
add("selser", "Ref: 9. unclosed comments should not leak out of ref-body
[[0,0,4],3,0]", "A <ref> foo <!--</ref>5f3nac1cbffde7b9<references />");
diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index 400cb76..1cccc25 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -1541,9 +1541,9 @@
<span typeof="mw:Transclusion"
data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a
}"}},"i":0}}]}" about="#mwt5"></span></p>
!! wikitext
{{echo|a [ b}}
-{{echo|a <nowiki>}}</nowiki> b}}
+{{echo|<nowiki>a }} b</nowiki>}}
{{echo|<nowiki>a [[ b</nowiki>}}
-{{echo|a {{!}} <nowiki>{{ ]]</nowiki>}}
+{{echo|<nowiki>a | {{ ]]</nowiki>}}
{{echo|a <nowiki>}</nowiki>}}
!! end
@@ -10271,7 +10271,7 @@
!! wikitext
{{echo|{{ }}}}
!! html/parsoid
-<p><span typeof="mw:Transclusion mw:Nowiki" about="#mwt1"
data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{
}}"}},"i":0}}]}'>{{ }}</span></p>
+<p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}'
data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{
}}"}},"i":0}}]}'>{{ }}</p>
!! end
!! article
@@ -21790,7 +21790,7 @@
<references />
!! html/parsoid
-<p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references"
typeof="mw:Extension/ref"
data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a
href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> B
C<span typeof="mw:Nowiki">}}</span></p>
+<p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references"
typeof="mw:Extension/ref"
data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a
href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> B
C}}</p>
<ol class="mw-references" typeof="mw:Extension/references" about="#mwt4"
data-mw='{"name":"references","attrs":{}}'>
<li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1"
rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span
id="mw-reference-text-cite_note-1" class="mw-reference-text">foo
{{echo|</span></li>
</ol>
@@ -24045,26 +24045,6 @@
</td><td style="color: red">Bar
</td></tr></tbody></table>
-!! end
-
-!! test
-2. Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug
42353)
-!! options
-parsoid
-!! wikitext
-{{}}
-!! html
-{{}}
-!! end
-
-!! test
-1. Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug
42353)
-!! options
-parsoid
-!! wikitext
-}}{{
-!! html
-}}{{
!! end
!!test
--
To view, visit https://gerrit.wikimedia.org/r/281045
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5fb9092547d0df002260ba04352e3f45e6db96c6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits