jenkins-bot has submitted this change and it was merged.

Change subject: Sync parserTests with core tests.
......................................................................


Sync parserTests with core tests.

This matches upstream core commit 4bff1ccc98b96a88e7bbb744eafecc91ec23c146.

This adds a number of new tests for magic links and free external links
which expose bugs in Parsoid.  These will be addressed by
I5ae8435322c78dd1df170d7a3543fff3642759b1 (bug T67278).

There's also a new table-related test ("Build table with pipe as data")
which seems to fail wt2wt, hopefully only due to <nowiki> insertion.

Change-Id: Ie5d52929980da98bdea3a8042f67352470285de9
---
M tests/fetch-parserTests.txt.js
M tests/parserTests-blacklist.js
M tests/parserTests.txt
3 files changed, 177 insertions(+), 27 deletions(-)

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



diff --git a/tests/fetch-parserTests.txt.js b/tests/fetch-parserTests.txt.js
index b46fc19..94b042b 100755
--- a/tests/fetch-parserTests.txt.js
+++ b/tests/fetch-parserTests.txt.js
@@ -12,9 +12,9 @@
 //     and update these hashes automatically.
 //
 // You can use 'sha1sum -b tests/parser/parserTests.txt' to compute this value:
-var expectedSHA1 = "c8e2bf0b8d69718c036cffdcb2263a55dc24daf4";
+var expectedSHA1 = "3f16e1b7902a4f5ba1403f074d22b660b9e00617";
 // git log --pretty=oneline -1 tests/parser/parserTests.txt
-var latestCommit = "3bf46cc4eae7fe8833a27779e6aa77fff9623871";
+var latestCommit = "4bff1ccc98b96a88e7bbb744eafecc91ec23c146";
 
 var fs = require('fs'),
        path = require('path'),
diff --git a/tests/parserTests-blacklist.js b/tests/parserTests-blacklist.js
index f8f9f6f..d6d50ca 100644
--- a/tests/parserTests-blacklist.js
+++ b/tests/parserTests-blacklist.js
@@ -52,7 +52,8 @@
 add("wt2html", "6. Pre-blocks should extend across lines with leading WS even 
when there is no wrappable content", "<pre 
data-parsoid='{\"dsr\":[0,26,1,0]}'>a\n\n <!-- continue -->\nb</pre>\n\n<pre 
data-parsoid='{\"dsr\":[28,30,1,0]}'>c</pre>\n \n<p 
data-parsoid='{\"dsr\":[33,34,0,0]}'>d</p>");
 add("wt2html", "Definition Lists: colons occurring in tags", "<dl 
data-parsoid='{\"dsr\":[0,93,0,0]}'><dt 
data-parsoid='{\"dsr\":[0,2,1,0]}'>a</dt><dd 
data-parsoid='{\"stx\":\"row\",\"dsr\":[2,4,1,0]}'>b</dd>\n<dt 
data-parsoid='{\"dsr\":[5,15,1,0]}'><b 
data-parsoid='{\"dsr\":[6,15,3,3]}'>a:b</b></dt>\n<dt 
data-parsoid='{\"dsr\":[16,27,1,0]}'><i 
data-parsoid='{\"stx\":\"html\",\"dsr\":[17,27,3,4]}'>a:b</i></dt>\n<dt 
data-parsoid='{\"dsr\":[28,45,1,0]}'><span 
data-parsoid='{\"stx\":\"html\",\"dsr\":[29,45,6,7]}'>a:b</span></dt>\n<dt 
data-parsoid='{\"dsr\":[46,61,1,0]}'><div 
data-parsoid='{\"stx\":\"html\",\"dsr\":[47,61,5,6]}'>a:b</div></dt>\n<dt 
data-parsoid='{\"dsr\":[62,75,1,0]}'><span about=\"#mwt1\" 
typeof=\"mw:Transclusion\" 
data-parsoid='{\"pi\":[[{\"k\":\"1\",\"spc\":[\"\",\"\",\"\",\"\"]}]],\"dsr\":[63,75,null,null]}'
 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"a:b\"}},\"i\":0}}]}'>a:b</span></dt>\n<dt
 data-parsoid='{\"dsr\":[76,93,1,0]}'><i about=\"#mwt2\" 
typeof=\"mw:Transclusion\" 
data-parsoid='{\"dsr\":[77,93,null,null],\"pi\":[[{\"k\":\"1\",\"spc\":[\"\",\"\",\"\",\"\"]}]]}'
 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&#39;&#39;a:b&#39;&#39;\"}},\"i\":0}}]}'>a:b</i></dt></dl>");
 add("wt2html", "Definition Lists: colons and tables 1", "<dl 
data-parsoid='{\"dsr\":[0,21,0,0]}'><dd 
data-parsoid='{\"dsr\":[0,10,1,0]}'><table 
data-parsoid='{\"dsr\":[1,10,2,2]}'>\n<tbody 
data-parsoid='{\"dsr\":[4,8,0,0]}'><tr 
data-parsoid='{\"autoInsertedEnd\":true,\"autoInsertedStart\":true,\"dsr\":[4,7,0,0]}'><td
 data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[4,7,1,0]}'> 
x</td></tr>\n</tbody></table></dd>\n<dd 
data-parsoid='{\"dsr\":[11,21,1,0]}'><table 
data-parsoid='{\"dsr\":[12,21,2,2]}'>\n<tbody 
data-parsoid='{\"dsr\":[15,19,0,0]}'><tr 
data-parsoid='{\"autoInsertedEnd\":true,\"autoInsertedStart\":true,\"dsr\":[15,18,0,0]}'><td
 data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[15,18,1,0]}'> 
y</td></tr>\n</tbody></table></dd></dl>");
-add("wt2html", "External links: Free with trailing punctuation", "<p 
data-parsoid='{\"dsr\":[0,198,0,0]}'><a rel=\"mw:ExtLink\" 
href=\"http://example.com\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[0,18,0,0]}'>http://example.com</a>,\n<a 
rel=\"mw:ExtLink\" href=\"http://example.com;\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[20,39,0,0]}'>http://example.com;</a>\n<a
 rel=\"mw:ExtLink\" href=\"http://example.com\\\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[40,59,0,0]}'>http://example.com\\</a>\n<a
 rel=\"mw:ExtLink\" href=\"http://example.com\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[60,78,0,0]}'>http://example.com</a>.\n<a
 rel=\"mw:ExtLink\" href=\"http://example.com\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[80,98,0,0]}'>http://example.com</a>:\n<a
 rel=\"mw:ExtLink\" href=\"http://example.com!\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[100,119,0,0]}'>http://example.com!</a>\n<a
 rel=\"mw:ExtLink\" href=\"http://example.com?\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[120,139,0,0]}'>http://example.com?</a>\n<a
 rel=\"mw:ExtLink\" href=\"http://example.com\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[140,158,0,0]}'>http://example.com</a>)\n<a
 rel=\"mw:ExtLink\" href=\"http://example.com/url_with_(brackets)\" 
data-parsoid='{\"stx\":\"url\",\"dsr\":[160,198,0,0]}'>http://example.com/url_with_(brackets)</a></p>");
+add("wt2html", "External links: Free with trailing punctuation", "<p 
data-parsoid='{\"dsr\":[0,483,0,0]}'><a rel=\"mw:ExtLink\" 
href=\"http://example.com\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[0,18,0,0]}'>http://example.com</a>,\n<a 
rel=\"mw:ExtLink\" href=\"http://example.com;\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[20,39,0,0]}'>http://example.com;</a>\n<a
 rel=\"mw:ExtLink\" href=\"http://example.com\\\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[40,59,0,0]}'>http://example.com\\</a>\n<a
 rel=\"mw:ExtLink\" href=\"http://example.com\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[60,78,0,0]}'>http://example.com</a>.\n<a
 rel=\"mw:ExtLink\" href=\"http://example.com\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[80,98,0,0]}'>http://example.com</a>:\n<a
 rel=\"mw:ExtLink\" href=\"http://example.com!\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[100,119,0,0]}'>http://example.com!</a>\n<a
 rel=\"mw:ExtLink\" href=\"http://example.com?\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[120,139,0,0]}'>http://example.com?</a>\n<a
 rel=\"mw:ExtLink\" href=\"http://example.com\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[140,158,0,0]}'>http://example.com</a>)\n<a
 rel=\"mw:ExtLink\" href=\"http://example.com/url_with_(brackets)\" 
data-parsoid='{\"stx\":\"url\",\"dsr\":[160,198,0,0]}'>http://example.com/url_with_(brackets)</a>\n(<a
 rel=\"mw:ExtLink\" href=\"http://example.com/url_without_brackets\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[200,239,0,0]}'>http://example.com/url_without_brackets</a>)\n<a
 rel=\"mw:ExtLink\" href=\"http://example.com/url_with_entity \"; 
data-parsoid='{\"stx\":\"url\",\"a\":{\"href\":\"http://example.com/url_with_entity
 
\"},\"sa\":{\"href\":\"http://example.com/url_with_entity&amp;nbsp;\"},\"dsr\":[241,281,0,0]}'>http://example.com/url_with_entity
 </a>\n<a rel=\"mw:ExtLink\" href=\"http://example.com/url_with_entity \"; 
data-parsoid='{\"stx\":\"url\",\"a\":{\"href\":\"http://example.com/url_with_entity
 
\"},\"sa\":{\"href\":\"http://example.com/url_with_entity&amp;#xA0;\"},\"dsr\":[282,322,0,0]}'>http://example.com/url_with_entity
 </a>\n<a rel=\"mw:ExtLink\" href=\"http://example.com/url_with_entity \"; 
data-parsoid='{\"stx\":\"url\",\"a\":{\"href\":\"http://example.com/url_with_entity
 
\"},\"sa\":{\"href\":\"http://example.com/url_with_entity&amp;#160;\"},\"dsr\":[323,363,0,0]}'>http://example.com/url_with_entity
 </a>\n<a rel=\"mw:ExtLink\" href=\"http://example.com/url_with_entity\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[364,398,0,0]}'>http://example.com/url_with_entity</a><span
 typeof=\"mw:Entity\" 
data-parsoid='{\"src\":\"&amp;lt;\",\"srcContent\":\"&lt;\",\"dsr\":[398,402,null,null]}'>&lt;</span>\n<a
 rel=\"mw:ExtLink\" href=\"http://example.com/url_with_entity&lt;\"; 
data-parsoid='{\"stx\":\"url\",\"a\":{\"href\":\"http://example.com/url_with_entity&lt;\"},\"sa\":{\"href\":\"http://example.com/url_with_entity&amp;#x3C;\"},\"dsr\":[403,443,0,0]}'>http://example.com/url_with_entity&lt;</a>\n<a
 rel=\"mw:ExtLink\" href=\"http://example.com/url_with_entity&lt;\"; 
data-parsoid='{\"stx\":\"url\",\"a\":{\"href\":\"http://example.com/url_with_entity&lt;\"},\"sa\":{\"href\":\"http://example.com/url_with_entity&amp;#60;\"},\"dsr\":[444,483,0,0]}'>http://example.com/url_with_entity&lt;</a></p>");
+add("wt2html", "External links: No preceding word characters allowed (bug 
65278)", "<p data-parsoid='{\"dsr\":[0,87,0,0]}'>NOPE<a rel=\"mw:ExtLink\" 
href=\"http://example.com\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[4,22,0,0]}'>http://example.com</a>\nN0<a
 rel=\"mw:ExtLink\" href=\"http://example.com\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[25,43,0,0]}'>http://example.com</a>\nok:<a
 rel=\"mw:ExtLink\" href=\"http://example.com\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[47,65,0,0]}'>http://example.com</a>\nok-<a
 rel=\"mw:ExtLink\" href=\"http://example.com\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[69,87,0,0]}'>http://example.com</a></p>");
 add("wt2html", "Bug 2702: Mismatched <i>, <b> and <a> tags are invalid", "<p 
data-parsoid='{\"dsr\":[0,204,0,0]}'><i 
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[0,29,2,0]}'><a 
rel=\"mw:ExtLink\" href=\"http://example.com\"; 
data-parsoid='{\"targetOff\":22,\"contentOffsets\":[22,28],\"dsr\":[2,29,20,1]}'>text<i
 data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[26,28,2,0]}'></i></a></i>\n<a 
rel=\"mw:ExtLink\" href=\"http://example.com\"; 
data-parsoid='{\"targetOff\":50,\"contentOffsets\":[50,57],\"dsr\":[30,58,20,1]}'><b
 data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[50,57,3,0]}'>text</b></a><b 
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[58,61,3,0]}'></b>\n<i 
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[62,106,2,0]}'>Something <a 
rel=\"mw:ExtLink\" href=\"http://example.com\"; 
data-parsoid='{\"targetOff\":94,\"contentOffsets\":[94,105],\"dsr\":[74,106,20,1]}'>in
 italic<i 
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[103,105,2,0]}'></i></a></i>\n<i
 data-parsoid='{\"dsr\":[107,164,2,2]}'>Something <a rel=\"mw:ExtLink\" 
href=\"http://example.com\"; 
data-parsoid='{\"targetOff\":139,\"contentOffsets\":[139,160],\"dsr\":[119,161,20,1]}'>mixed<b
 data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[144,160,3,0]}'><i 
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[147,160,2,0]}'>, even 
bold</i></b></a>'</i>\n<b 
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[165,204,3,0]}'><i 
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[168,204,2,0]}'>Now <a 
rel=\"mw:ExtLink\" href=\"http://example.com\"; 
data-parsoid='{\"targetOff\":194,\"contentOffsets\":[194,203],\"dsr\":[174,204,20,1]}'>both<b
 data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[198,203,3,0]}'><i 
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[201,203,2,0]}'></i></b></a></i></b></p>");
 add("wt2html", "External link containing double-single-quotes in text embedded 
in italics (bug 4598 sanity check)", "<p data-parsoid='{\"dsr\":[0,60,0,0]}'><i 
data-parsoid='{\"dsr\":[0,60,2,2]}'>Some <a rel=\"mw:ExtLink\" 
href=\"http://example.com/\"; 
data-parsoid='{\"targetOff\":28,\"contentOffsets\":[28,56],\"dsr\":[7,57,21,1]}'>pretty
 <i data-parsoid='{\"dsr\":[35,46,2,2]}'>italics</i> and stuff</a>!</i></p>");
 add("wt2html", "Template-generated table cell attributes and cell content 
(2)", "<table data-parsoid='{\"dsr\":[0,35,2,2]}'>\n<tbody 
data-parsoid='{\"dsr\":[3,33,0,0]}'><tr 
data-parsoid='{\"autoInsertedEnd\":true,\"autoInsertedStart\":true,\"dsr\":[3,32,0,0]}'><td
 align=\"center\" style=\"color: red\" typeof=\"mw:Transclusion\" 
about=\"#mwt1\" 
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[3,32,1,0],\"pi\":[[]]}' 
data-mw='{\"parts\":[\"|align=center 
\",{\"template\":{\"target\":{\"wt\":\"table_cells\",\"href\":\"./Template:Table_cells\"},\"params\":{},\"i\":0}}]}'>
 Foo<span> || Bar || Baz</span></td></tr>\n</tbody></table>");
@@ -99,6 +100,9 @@
 add("wt2html", "Namespace -1 {{ns:-1}}", "<p about=\"#mwt1\" 
typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,9,0,0],\"pi\":[[]]}' 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"ns:-1\",\"function\":\"ns\"},\"params\":{},\"i\":0}}]}'>-1</p>");
 add("wt2html", "Namespace (lang=de) Benutzer Diskussion {{ns:3}}", "<p 
about=\"#mwt1\" typeof=\"mw:Transclusion\" 
data-parsoid='{\"dsr\":[0,8,0,0],\"pi\":[[]]}' 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"ns:3\",\"function\":\"ns\"},\"params\":{},\"i\":0}}]}'>3</p>");
 add("wt2html", "Urlencode", "<p data-parsoid='{\"dsr\":[0,115,0,0]}'><span 
about=\"#mwt1\" typeof=\"mw:Transclusion\" 
data-parsoid='{\"pi\":[[]],\"dsr\":[0,24,null,null]}' 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"urlencode:hi 
world?!\",\"function\":\"urlencode\"},\"params\":{},\"i\":0}}]}'>hi%20world%3F!</span>\n<span
 about=\"#mwt2\" typeof=\"mw:Transclusion\" 
data-parsoid='{\"pi\":[[{\"k\":\"1\",\"spc\":[\"\",\"\",\"\",\"\"]}]],\"dsr\":[25,54,null,null]}'
 data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"urlencode:hi 
world?!\",\"function\":\"urlencode\"},\"params\":{\"1\":{\"wt\":\"WIKI\"}},\"i\":0}}]}'>hi%20world%3F!</span>\n<span
 about=\"#mwt3\" typeof=\"mw:Transclusion\" 
data-parsoid='{\"pi\":[[{\"k\":\"1\",\"spc\":[\"\",\"\",\"\",\"\"]}]],\"dsr\":[55,84,null,null]}'
 data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"urlencode:hi 
world?!\",\"function\":\"urlencode\"},\"params\":{\"1\":{\"wt\":\"PATH\"}},\"i\":0}}]}'>hi%20world%3F!</span>\n<span
 about=\"#mwt4\" typeof=\"mw:Transclusion\" 
data-parsoid='{\"pi\":[[{\"k\":\"1\",\"spc\":[\"\",\"\",\"\",\"\"]}]],\"dsr\":[85,115,null,null]}'
 data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"urlencode:hi 
world?!\",\"function\":\"urlencode\"},\"params\":{\"1\":{\"wt\":\"QUERY\"}},\"i\":0}}]}'>hi%20world%3F!</span></p>");
+add("wt2html", "Magic links: RFC (bug 65278)", "<p 
data-parsoid='{\"dsr\":[0,53,0,0]}'>This is <a 
href=\"//tools.ietf.org/html/rfc822\" rel=\"mw:ExtLink\" 
data-parsoid='{\"stx\":\"magiclink\",\"dsr\":[8,15,0,0]}'>RFC 822</a> but 
this<a href=\"//tools.ietf.org/html/rfc822\" rel=\"mw:ExtLink\" 
data-parsoid='{\"stx\":\"magiclink\",\"dsr\":[24,31,0,0]}'>RFC 822</a> is not 
<a href=\"//tools.ietf.org/html/rfc822\" rel=\"mw:ExtLink\" 
data-parsoid='{\"stx\":\"magiclink\",\"dsr\":[39,46,0,0]}'>RFC 
822</a>linked.</p>");
+add("wt2html", "Magic links: ISBN (bug 65278)", "<p 
data-parsoid='{\"dsr\":[0,98,0,0]}'>This is <a 
href=\"./Special:BookSources/9780316098113\" rel=\"mw:ExtLink\" 
data-parsoid='{\"stx\":\"magiclink\",\"dsr\":[8,30,0,0]}'>ISBN 
978-0-316-09811-3</a> but this<a href=\"./Special:BookSources/9780316098113\" 
rel=\"mw:ExtLink\" 
data-parsoid='{\"stx\":\"magiclink\",\"dsr\":[39,61,0,0]}'>ISBN 
978-0-316-09811-3</a> is not ISBN 978-0-316-09811-3linked.</p>");
+add("wt2html", "Magic links: PMID (bug 65278)", "<p 
data-parsoid='{\"dsr\":[0,59,0,0]}'>This is <a 
href=\"//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract\" rel=\"mw:ExtLink\" 
data-parsoid='{\"stx\":\"magiclink\",\"dsr\":[8,17,0,0]}'>PMID 1234</a> but 
this<a href=\"//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract\" 
rel=\"mw:ExtLink\" 
data-parsoid='{\"stx\":\"magiclink\",\"dsr\":[26,35,0,0]}'>PMID 1234</a> is not 
<a href=\"//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract\" rel=\"mw:ExtLink\" 
data-parsoid='{\"stx\":\"magiclink\",\"dsr\":[43,52,0,0]}'>PMID 
1234</a>linked.</p>");
 add("wt2html", "Nonexistent template", "<p 
data-parsoid='{\"dsr\":[0,28,0,0]}'><span typeof=\"mw:Transclusion 
mw:Placeholder\" about=\"#mwt1\" id=\"mwt1\" 
data-parsoid='{\"dsr\":[0,28,null,null],\"pi\":[[]]}' 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"thistemplatedoesnotexist\",\"href\":\"./Template:Thistemplatedoesnotexist\"},\"params\":{},\"i\":0}}]}'>Warning:
 Page/template fetching disabled, and no cache for 
Template:Thistemplatedoesnotexist</span></p>");
 add("wt2html", "Template with invalid target containing tags", "<p 
data-parsoid='{\"dsr\":[0,54,0,0]}'>{{a<b 
data-parsoid='{\"stx\":\"html\",\"dsr\":[3,11,3,4]}'>b</b>|<span 
about=\"#mwt2\" typeof=\"mw:Transclusion\" 
data-parsoid='{\"pi\":[[{\"k\":\"1\",\"spc\":[\"\",\"\",\"\",\"\"]}]],\"dsr\":[12,24,null,null]}'
 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"foo\"}},\"i\":0}}]}'>foo</span>|<span
 about=\"#mwt3\" typeof=\"mw:Transclusion\" 
data-parsoid='{\"pi\":[[{\"k\":\"1\",\"spc\":[\"\",\"\",\"\",\"\"]}]],\"dsr\":[25,35,null,null]}'
 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"a\"}},\"i\":0}}]}'>a</span>=<span
 about=\"#mwt4\" typeof=\"mw:Transclusion\" 
data-parsoid='{\"pi\":[[{\"k\":\"1\",\"spc\":[\"\",\"\",\"\",\"\"]}]],\"dsr\":[36,46,null,null]}'
 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"b\"}},\"i\":0}}]}'>b</span>|a
 =b}}</p>");
 add("wt2html", "Template with invalid target containing unclosed tag", "<p 
data-parsoid='{\"dsr\":[0,49,0,0]}'>{{a<b 
data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[3,49,3,0]}'>|<span
 about=\"#mwt2\" typeof=\"mw:Transclusion\" 
data-parsoid='{\"pi\":[[{\"k\":\"1\",\"spc\":[\"\",\"\",\"\",\"\"]}]],\"dsr\":[7,19,null,null]}'
 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"foo\"}},\"i\":0}}]}'>foo</span>|<span
 about=\"#mwt3\" typeof=\"mw:Transclusion\" 
data-parsoid='{\"pi\":[[{\"k\":\"1\",\"spc\":[\"\",\"\",\"\",\"\"]}]],\"dsr\":[20,30,null,null]}'
 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"a\"}},\"i\":0}}]}'>a</span>=<span
 about=\"#mwt4\" typeof=\"mw:Transclusion\" 
data-parsoid='{\"pi\":[[{\"k\":\"1\",\"spc\":[\"\",\"\",\"\",\"\"]}]],\"dsr\":[31,41,null,null]}'
 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"b\"}},\"i\":0}}]}'>b</span>|a
 =b}}</b></p>");
@@ -281,11 +285,11 @@
 add("wt2html", "Special:Search page linking.", "<p about=\"#mwt1\" 
typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[0,18,0,0],\"pi\":[[]]}' 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"Special:search\",\"function\":\"special\"},\"params\":{},\"i\":0}}]}'>Parser
 function implementation for pf_special missing in Parsoid.</p>");
 add("wt2html", "Say the magic word", "<ul 
data-parsoid='{\"dsr\":[0,544,0,0]}'><li data-parsoid='{\"dsr\":[0,14,1,0]}'> 
<span about=\"#mwt1\" typeof=\"mw:Transclusion\" 
data-parsoid='{\"pi\":[[]],\"dsr\":[2,14,null,null]}' 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"PAGENAME\",\"function\":\"pagename\"},\"params\":{},\"i\":0}}]}'>Parser
 test</span></li>\n<li data-parsoid='{\"dsr\":[15,30,1,0]}'> <span 
about=\"#mwt2\" typeof=\"mw:Transclusion\" 
data-parsoid='{\"dsr\":[17,30,null,null],\"pi\":[[]]}' 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"PAGENAMEE\",\"function\":\"pagenamee\"},\"params\":{},\"i\":0}}]}'></span></li>\n<li
 data-parsoid='{\"dsr\":[31,49,1,0]}'> <span about=\"#mwt3\" 
typeof=\"mw:Transclusion\" 
data-parsoid='{\"pi\":[[]],\"dsr\":[33,49,null,null]}' 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"FULLPAGENAME\",\"function\":\"fullpagename\"},\"params\":{},\"i\":0}}]}'>Parser
 test</span></li>\n<li data-parsoid='{\"dsr\":[50,69,1,0]}'> <span 
about=\"#mwt4\" typeof=\"mw:Transclusion\" 
data-parsoid='{\"pi\":[[]],\"dsr\":[52,69,null,null]}' 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"FULLPAGENAMEE\",\"function\":\"fullpagenamee\"},\"params\":{},\"i\":0}}]}'>Parser
 test</span></li>\n<li data-parsoid='{\"dsr\":[70,88,1,0]}'> <span 
typeof=\"mw:Transclusion mw:Placeholder\" about=\"#mwt5\" id=\"mwt5\" 
data-parsoid='{\"dsr\":[72,88,null,null],\"pi\":[[]]}' 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"BASEPAGENAME\",\"href\":\"./Template:BASEPAGENAME\"},\"params\":{},\"i\":0}}]}'>Warning:
 Page/template fetching disabled, and no cache for 
Template:BASEPAGENAME</span></li>\n<li data-parsoid='{\"dsr\":[89,108,1,0]}'> 
<span typeof=\"mw:Transclusion mw:Placeholder\" about=\"#mwt6\" id=\"mwt6\" 
data-parsoid='{\"dsr\":[91,108,null,null],\"pi\":[[]]}' 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"BASEPAGENAMEE\",\"href\":\"./Template:BASEPAGENAMEE\"},\"params\":{},\"i\":0}}]}'>Warning:
 Page/template fetching disabled, and no cache for 
Template:BASEPAGENAMEE</span></li>\n<li data-parsoid='{\"dsr\":[109,126,1,0]}'> 
<span typeof=\"mw:Transclusion mw:Placeholder\" about=\"#mwt7\" id=\"mwt7\" 
data-parsoid='{\"dsr\":[111,126,null,null],\"pi\":[[]]}' 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"SUBPAGENAME\",\"href\":\"./Template:SUBPAGENAME\"},\"params\":{},\"i\":0}}]}'>Warning:
 Page/template fetching disabled, and no cache for 
Template:SUBPAGENAME</span></li>\n<li data-parsoid='{\"dsr\":[127,145,1,0]}'> 
<span typeof=\"mw:Transclusion mw:Placeholder\" about=\"#mwt8\" id=\"mwt8\" 
data-parsoid='{\"dsr\":[129,145,null,null],\"pi\":[[]]}' 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"SUBPAGENAMEE\",\"href\":\"./Template:SUBPAGENAMEE\"},\"params\":{},\"i\":0}}]}'>Warning:
 Page/template fetching disabled, and no cache for 
Template:SUBPAGENAMEE</span></li>\n<li data-parsoid='{\"dsr\":[146,164,1,0]}'> 
<span typeof=\"mw:Transclusion mw:Placeholder\" about=\"#mwt9\" id=\"mwt9\" 
data-parsoid='{\"dsr\":[148,164,null,null],\"pi\":[[]]}' 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"ROOTPAGENAME\",\"href\":\"./Template:ROOTPAGENAME\"},\"params\":{},\"i\":0}}]}'>Warning:
 Page/template fetching disabled, and no cache for 
Template:ROOTPAGENAME</span></li>\n<li data-parsoid='{\"dsr\":[165,184,1,0]}'> 
<span typeof=\"mw:Transclusion mw:Placeholder\" about=\"#mwt10\" id=\"mwt10\" 
data-parsoid='{\"dsr\":[167,184,null,null],\"pi\":[[]]}' 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"ROOTPAGENAMEE\",\"href\":\"./Template:ROOTPAGENAMEE\"},\"params\":{},\"i\":0}}]}'>Warning:
 Page/template fetching disabled, and no cache for 
Template:ROOTPAGENAMEE</span></li>\n<li data-parsoid='{\"dsr\":[185,203,1,0]}'> 
<span about=\"#mwt11\" typeof=\"mw:Transclusion\" 
data-parsoid='{\"pi\":[[]],\"dsr\":[187,203,null,null]}' 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"TALKPAGENAME\",\"function\":\"talkpagename\"},\"params\":{},\"i\":0}}]}'>Parser
 test</span></li>\n<li data-parsoid='{\"dsr\":[204,223,1,0]}'> <span 
typeof=\"mw:Transclusion mw:Placeholder\" about=\"#mwt12\" id=\"mwt12\" 
data-parsoid='{\"dsr\":[206,223,null,null],\"pi\":[[]]}' 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"TALKPAGENAMEE\",\"href\":\"./Template:TALKPAGENAMEE\"},\"params\":{},\"i\":0}}]}'>Warning:
 Page/template fetching disabled, and no cache for 
Template:TALKPAGENAMEE</span></li>\n<li data-parsoid='{\"dsr\":[224,245,1,0]}'> 
<span typeof=\"mw:Transclusion mw:Placeholder\" about=\"#mwt13\" id=\"mwt13\" 
data-parsoid='{\"dsr\":[226,245,null,null],\"pi\":[[]]}' 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"SUBJECTPAGENAME\",\"href\":\"./Template:SUBJECTPAGENAME\"},\"params\":{},\"i\":0}}]}'>Warning:
 Page/template fetching disabled, and no cache for 
Template:SUBJECTPAGENAME</span></li>\n<li 
data-parsoid='{\"dsr\":[246,268,1,0]}'> <span typeof=\"mw:Transclusion 
mw:Placeholder\" about=\"#mwt14\" id=\"mwt14\" 
data-parsoid='{\"dsr\":[248,268,null,null],\"pi\":[[]]}' 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"SUBJECTPAGENAMEE\",\"href\":\"./Template:SUBJECTPAGENAMEE\"},\"params\":{},\"i\":0}}]}'>Warning:
 Page/template fetching disabled, and no cache for 
Template:SUBJECTPAGENAMEE</span></li>\n<li 
data-parsoid='{\"dsr\":[269,285,1,0]}'> <span about=\"#mwt15\" 
typeof=\"mw:Transclusion\" 
data-parsoid='{\"pi\":[[]],\"dsr\":[271,285,null,null]}' 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"NAMESPACEE\",\"function\":\"namespacee\"},\"params\":{},\"i\":0}}]}'>Main</span></li>\n<li
 data-parsoid='{\"dsr\":[286,301,1,0]}'> <span about=\"#mwt16\" 
typeof=\"mw:Transclusion\" 
data-parsoid='{\"pi\":[[]],\"dsr\":[288,301,null,null]}' 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"NAMESPACE\",\"function\":\"namespace\"},\"params\":{},\"i\":0}}]}'>Main</span></li>\n<li
 data-parsoid='{\"dsr\":[302,323,1,0]}'> <span about=\"#mwt17\" 
typeof=\"mw:Transclusion\" 
data-parsoid='{\"dsr\":[304,323,null,null],\"pi\":[[]]}' 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"NAMESPACENUMBER\",\"function\":\"namespacenumber\"},\"params\":{},\"i\":0}}]}'></span></li>\n<li
 data-parsoid='{\"dsr\":[324,339,1,0]}'> <span about=\"#mwt18\" 
typeof=\"mw:Transclusion\" 
data-parsoid='{\"pi\":[[]],\"dsr\":[326,339,null,null]}' 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"TALKSPACE\",\"function\":\"talkspace\"},\"params\":{},\"i\":0}}]}'>Talk</span></li>\n<li
 data-parsoid='{\"dsr\":[340,356,1,0]}'> <span typeof=\"mw:Transclusion 
mw:Placeholder\" about=\"#mwt19\" id=\"mwt19\" 
data-parsoid='{\"dsr\":[342,356,null,null],\"pi\":[[]]}' 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"TALKSPACEE\",\"href\":\"./Template:TALKSPACEE\"},\"params\":{},\"i\":0}}]}'>Warning:
 Page/template fetching disabled, and no cache for 
Template:TALKSPACEE</span></li>\n<li data-parsoid='{\"dsr\":[357,375,1,0]}'> 
<span about=\"#mwt20\" typeof=\"mw:Transclusion\" 
data-parsoid='{\"pi\":[[]],\"dsr\":[359,375,null,null]}' 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"SUBJECTSPACE\",\"function\":\"subjectspace\"},\"params\":{},\"i\":0}}]}'>Main</span></li>\n<li
 data-parsoid='{\"dsr\":[376,395,1,0]}'> <span typeof=\"mw:Transclusion 
mw:Placeholder\" about=\"#mwt21\" id=\"mwt21\" 
data-parsoid='{\"dsr\":[378,395,null,null],\"pi\":[[]]}' 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"SUBJECTSPACEE\",\"href\":\"./Template:SUBJECTSPACEE\"},\"params\":{},\"i\":0}}]}'>Warning:
 Page/template fetching disabled, and no cache for 
Template:SUBJECTSPACEE</span></li>\n<li data-parsoid='{\"dsr\":[396,544,1,0]}'> 
<span typeof=\"mw:Transclusion mw:Placeholder\" about=\"#mwt22\" id=\"mwt22\" 
data-parsoid='{\"dsr\":[398,544,null,null],\"pi\":[[{\"k\":\"1\",\"spc\":[\"\",\"\",\"\",\"\"]},{\"k\":\"2\",\"spc\":[\"\",\"\",\"\",\"\"]},{\"k\":\"3\",\"spc\":[\"\",\"\",\"\",\"\"]},{\"k\":\"4\",\"spc\":[\"\",\"\",\"\",\"\"]},{\"k\":\"5\",\"spc\":[\"\",\"\",\"\",\"\"]},{\"k\":\"6\",\"spc\":[\"\",\"\",\"\",\"\"]},{\"k\":\"7\",\"spc\":[\"\",\"\",\"\",\"\"]}]]}'
 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"Dynamic\",\"href\":\"./Template:Dynamic\"},\"params\":{\"1\":{\"wt\":\"{{NUMBEROFUSERS}}\"},\"2\":{\"wt\":\"{{NUMBEROFPAGES}}\"},\"3\":{\"wt\":\"{{CURRENTVERSION}}\"},\"4\":{\"wt\":\"{{CONTENTLANGUAGE}}\"},\"5\":{\"wt\":\"{{DIRECTIONMARK}}\"},\"6\":{\"wt\":\"{{CURRENTTIMESTAMP}}\"},\"7\":{\"wt\":\"{{NUMBEROFARTICLES}}\"}},\"i\":0}}]}'>Warning:
 Page/template fetching disabled, and no cache for 
Template:Dynamic</span></li></ul>");
 add("wt2html", "Gallery", "<p data-parsoid='{\"dsr\":[0,131,0,0]}'><span 
typeof=\"mw:Extension/gallery\" about=\"#mwt1\" 
data-parsoid='{\"stx\":\"html\",\"src\":\"&lt;gallery>\\nimage1.png 
|\\nimage2.gif|||||\\n\\nimage3|\\nimage4    |300px| centre\\n image5.svg| 
http://///////\\n[[x|xx]]]]\\n* 
image6\\n&lt;/gallery>\",\"tagWidths\":[9,10],\"dsr\":[0,131,9,10]}'>&lt;gallery>\nimage1.png
 |\nimage2.gif|||||\n\nimage3|\nimage4    |300px| centre\n image5.svg| 
http://///////\n[[x|xx]]]]\n* image6\n&lt;/gallery></span></p>");
-add("wt2html", "Gallery (with options)", "<p 
data-parsoid='{\"dsr\":[0,261,0,0]}'><span typeof=\"mw:Extension/gallery\" 
about=\"#mwt1\" 
data-parsoid=\"{&quot;stx&quot;:&quot;html&quot;,&quot;src&quot;:&quot;&lt;gallery
 widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' 
>\\nFile:Nonexistant.jpg|caption\\nFile:Nonexistant.jpg\\nimage:foobar.jpg|some 
'''caption''' [[Main 
Page]]\\nimage:foobar.jpg\\nimage:foobar.jpg|Blabla|alt=This is a 
foo-bar.|blabla.\\n&lt;/gallery>&quot;,&quot;tagWidths&quot;:[78,10],&quot;dsr&quot;:[0,261,78,10]}\">&lt;gallery
 widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' 
>\nFile:Nonexistant.jpg|caption\nFile:Nonexistant.jpg\nimage:foobar.jpg|some 
'''caption''' [[Main Page]]\nimage:foobar.jpg\nimage:foobar.jpg|Blabla|alt=This 
is a foo-bar.|blabla.\n&lt;/gallery></span></p>");
+add("wt2html", "Gallery (with options)", "<p 
data-parsoid='{\"dsr\":[0,261,0,0]}'><span typeof=\"mw:Extension/gallery\" 
about=\"#mwt1\" 
data-parsoid=\"{&quot;stx&quot;:&quot;html&quot;,&quot;src&quot;:&quot;&lt;gallery
 widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' 
>\\nFile:Nonexistent.jpg|caption\\nFile:Nonexistent.jpg\\nimage:foobar.jpg|some 
'''caption''' [[Main 
Page]]\\nimage:foobar.jpg\\nimage:foobar.jpg|Blabla|alt=This is a 
foo-bar.|blabla.\\n&lt;/gallery>&quot;,&quot;tagWidths&quot;:[78,10],&quot;dsr&quot;:[0,261,78,10]}\">&lt;gallery
 widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' 
>\nFile:Nonexistent.jpg|caption\nFile:Nonexistent.jpg\nimage:foobar.jpg|some 
'''caption''' [[Main Page]]\nimage:foobar.jpg\nimage:foobar.jpg|Blabla|alt=This 
is a foo-bar.|blabla.\n&lt;/gallery></span></p>");
 add("wt2html", "Gallery with link that has fragment", "<p 
data-parsoid='{\"dsr\":[0,140,0,0]}'><span typeof=\"mw:Extension/gallery\" 
about=\"#mwt1\" 
data-parsoid='{\"stx\":\"html\",\"src\":\"&lt;gallery>\\nimage:foobar.jpg|link=Main_Page\\nimage:foobar.jpg|link=Main_Page#section\\nimage:foobar.jpg|link=Main
 
Page#section|caption\\n&lt;/gallery>\",\"tagWidths\":[9,10],\"dsr\":[0,140,9,10]}'>&lt;gallery>\nimage:foobar.jpg|link=Main_Page\nimage:foobar.jpg|link=Main_Page#section\nimage:foobar.jpg|link=Main
 Page#section|caption\n&lt;/gallery></span></p>");
 add("wt2html", "Gallery with wikitext inside caption", "<p 
data-parsoid='{\"dsr\":[0,156,0,0]}'><span typeof=\"mw:Extension/gallery\" 
about=\"#mwt1\" 
data-parsoid='{\"stx\":\"html\",\"src\":\"&lt;gallery>\\nFile:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt\\nFile:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt\\n&lt;/gallery>\",\"tagWidths\":[9,10],\"dsr\":[0,156,9,10]}'>&lt;gallery>\nFile:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt\nFile:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt\n&lt;/gallery></span></p>");
-add("wt2html", "gallery (with showfilename option)", "<p 
data-parsoid='{\"dsr\":[0,149,0,0]}'><span typeof=\"mw:Extension/gallery\" 
about=\"#mwt1\" data-parsoid='{\"stx\":\"html\",\"src\":\"&lt;gallery 
showfilename>\\nFile:Nonexistant.jpg|caption\\nFile:Nonexistant.jpg\\nimage:foobar.jpg|some
 &#39;&#39;&#39;caption&#39;&#39;&#39; [[Main 
Page]]\\nFile:Foobar.jpg\\n&lt;/gallery>\",\"tagWidths\":[22,10],\"dsr\":[0,149,22,10]}'>&lt;gallery
 
showfilename>\nFile:Nonexistant.jpg|caption\nFile:Nonexistant.jpg\nimage:foobar.jpg|some
 '''caption''' [[Main Page]]\nFile:Foobar.jpg\n&lt;/gallery></span></p>");
-add("wt2html", "Gallery (with namespace-less filenames)", "<p 
data-parsoid='{\"dsr\":[0,85,0,0]}'><span typeof=\"mw:Extension/gallery\" 
about=\"#mwt1\" 
data-parsoid='{\"stx\":\"html\",\"src\":\"&lt;gallery>\\nFile:Nonexistant.jpg\\nNonexistant.jpg\\nimage:foobar.jpg\\nfoobar.jpg\\n&lt;/gallery>\",\"tagWidths\":[9,10],\"dsr\":[0,85,9,10]}'>&lt;gallery>\nFile:Nonexistant.jpg\nNonexistant.jpg\nimage:foobar.jpg\nfoobar.jpg\n&lt;/gallery></span></p>");
+add("wt2html", "gallery (with showfilename option)", "<p 
data-parsoid='{\"dsr\":[0,149,0,0]}'><span typeof=\"mw:Extension/gallery\" 
about=\"#mwt1\" data-parsoid='{\"stx\":\"html\",\"src\":\"&lt;gallery 
showfilename>\\nFile:Nonexistent.jpg|caption\\nFile:Nonexistent.jpg\\nimage:foobar.jpg|some
 &#39;&#39;&#39;caption&#39;&#39;&#39; [[Main 
Page]]\\nFile:Foobar.jpg\\n&lt;/gallery>\",\"tagWidths\":[22,10],\"dsr\":[0,149,22,10]}'>&lt;gallery
 
showfilename>\nFile:Nonexistent.jpg|caption\nFile:Nonexistent.jpg\nimage:foobar.jpg|some
 '''caption''' [[Main Page]]\nFile:Foobar.jpg\n&lt;/gallery></span></p>");
+add("wt2html", "Gallery (with namespace-less filenames)", "<p 
data-parsoid='{\"dsr\":[0,85,0,0]}'><span typeof=\"mw:Extension/gallery\" 
about=\"#mwt1\" 
data-parsoid='{\"stx\":\"html\",\"src\":\"&lt;gallery>\\nFile:Nonexistent.jpg\\nNonexistent.jpg\\nimage:foobar.jpg\\nfoobar.jpg\\n&lt;/gallery>\",\"tagWidths\":[9,10],\"dsr\":[0,85,9,10]}'>&lt;gallery>\nFile:Nonexistent.jpg\nNonexistent.jpg\nimage:foobar.jpg\nfoobar.jpg\n&lt;/gallery></span></p>");
 add("wt2html", "__FORCETOC__ override", "<meta 
property=\"mw:PageProp/newsectionlink\" 
data-parsoid='{\"src\":\"__NEWSECTIONLINK__\",\"magicSrc\":\"__NEWSECTIONLINK__\",\"dsr\":[0,18,null,null]}'/>\n<meta
 property=\"mw:PageProp/forcetoc\" 
data-parsoid='{\"src\":\"__FORCETOC__\",\"magicSrc\":\"__FORCETOC__\",\"dsr\":[19,31,null,null]}'/>");
 add("wt2html", "Centre-aligned image", "<figure class=\"mw-default-size 
mw-halign-center\" typeof=\"mw:Image\" 
data-parsoid='{\"optList\":[{\"ck\":\"center\",\"ak\":\"centre\"}],\"dsr\":[0,27,2,2]}'><a
 href=\"./File:Foobar.jpg\" 
data-parsoid='{\"a\":{\"href\":\"./File:Foobar.jpg\"},\"sa\":{},\"dsr\":[2,25,null,null]}'><img
 resource=\"./File:Foobar.jpg\" src=\"//example.com/images/3/3a/Foobar.jpg\" 
height=\"220\" width=\"1941\" 
data-parsoid='{\"a\":{\"resource\":\"./File:Foobar.jpg\",\"height\":\"220\",\"width\":\"1941\"},\"sa\":{\"resource\":\"Image:foobar.jpg\"}}'/></a></figure>");
 add("wt2html", "None-aligned image", "<figure class=\"mw-default-size 
mw-halign-none\" typeof=\"mw:Image\" 
data-parsoid='{\"optList\":[{\"ck\":\"none\",\"ak\":\"none\"}],\"dsr\":[0,25,2,2]}'><a
 href=\"./File:Foobar.jpg\" 
data-parsoid='{\"a\":{\"href\":\"./File:Foobar.jpg\"},\"sa\":{},\"dsr\":[2,23,null,null]}'><img
 resource=\"./File:Foobar.jpg\" src=\"//example.com/images/3/3a/Foobar.jpg\" 
height=\"220\" width=\"1941\" 
data-parsoid='{\"a\":{\"resource\":\"./File:Foobar.jpg\",\"height\":\"220\",\"width\":\"1941\"},\"sa\":{\"resource\":\"Image:foobar.jpg\"}}'/></a></figure>");
@@ -426,6 +430,7 @@
 add("wt2wt", "Templates: Handle comments in the target", "{{echo\n<!-- should 
be ignored -->\n|foo}}\n\n{{echo<!-- should be ignored 
-->\n|foo}}\n\n{{echo<!-- should be ignored -->|foo}}\n\n{{echo|foo}}");
 add("wt2wt", "4. Indent-Pre and extension tags", " a <gallery>\n 
File:foobar.jpg\n </gallery>\n");
 add("wt2wt", "Definition lists: self-closed tag", ";one<br />two : two-line 
fun");
+add("wt2wt", "External links: No preceding word characters allowed (bug 
65278)", 
"NOPE<nowiki/>http://example.com\nN0<nowiki/>http://example.com\nok:http://example.com\nok-http://example.com\n";);
 add("wt2wt", "BUG 289: \">\"-token in bracketed URL", 
"[http://www.example.com/ <hello> stuff]\n");
 add("wt2wt", "BUG 289: literal \">\"-token in bracketed URL", 
"[http://www.example.com/ <b>html</b> stuff]\n");
 add("wt2wt", "BUG 289: literal double quote in bracketed URL", 
"[http://www.example.com/ \"hello\" stuff]\n");
@@ -442,6 +447,7 @@
 add("wt2wt", "Invalid attributes in table cell (bug 1830)", "{|\n| Cell: 
|broken\n|}");
 add("wt2wt", "Table attributes with empty value", "{|\n| style=\"\" | 
hello\n|}");
 add("wt2wt", "Build table with {{!}}", "{{{!}} class=\"wikitable\"\n! 
header\n! second header\n{{!}}- style=\"color:red;\"\n{{!}} data {{!}}{{!}} 
style=\"color:red;\"{{!}} second data\n{{!}}}");
+add("wt2wt", "Build table with pipe as data", "{| class=\"wikitable\"\n! 
header\n! second header\n|- style=\"color:red;\"\n| data || 
style=\"color:red;\" | second data\n|-\n| style=\"color:red;\" |<nowiki> data 
with | </nowiki>|| style=\"color:red;\" | second data with |\n|-\n||<nowiki> 
data with | </nowiki>||| second data with |\n|}");
 add("wt2wt", "Piped link with multiple pipe characters in link text", "[[Main 
Page|<nowiki>|The|Main|Page|</nowiki>]]\n");
 add("wt2wt", "Parsoid-centric test: Whitespace in ext- and wiki-links should 
be preserved", "[[Foo|  bar]]\n\n[[Foo|  ''bar'']]\n\n[http://wp.org 
foo]\n\n[http://wp.org ''foo'']\n");
 add("wt2wt", "Handling html with a div self-closing tag", "<div title=\"\" 
/>\n<div title=\"\" />\n<div title=\"\" />\n<div title=\"bar\" />\n<div 
title=\"bar\" />\n<div title=\"bar/\">");
@@ -556,9 +562,11 @@
 add("html2html", "Definition lists: colon in HTML attribute", "<dl 
data-parsoid='{\"dsr\":[0,12,0,0]}'><dt data-parsoid='{\"dsr\":[0,12,1,0]}'> <b 
data-parsoid='{\"dsr\":[2,12,3,3]}'>bold</b></dt></dl>\n");
 add("html2html", "Definition Lists: Nesting: Multi-level (Parsoid only)", 
"\n<dl data-parsoid='{\"dsr\":[1,116,0,0]}'><dt 
data-parsoid='{\"dsr\":[1,6,1,0]}'> t1 </dt>\n<dd 
data-parsoid='{\"dsr\":[7,17,1,0]}'> d1      </dd>\n<dt 
data-parsoid='{\"dsr\":[18,116,1,0]}'><dl 
data-parsoid='{\"dsr\":[19,116,0,0]}'><dt data-parsoid='{\"dsr\":[19,24,1,0]}'> 
t2 </dt>\n<dd data-parsoid='{\"dsr\":[25,62,1,0]}'> <span typeof=\"mw:Nowiki\" 
data-parsoid='{\"dsr\":[28,48,8,9]}'>:d2</span>              </dd>\n<dt 
data-parsoid='{\"dsr\":[63,116,2,0]}'><dl 
data-parsoid='{\"dsr\":[65,116,0,0]}'><dt data-parsoid='{\"dsr\":[65,70,1,0]}'> 
t3 </dt>\n<dd data-parsoid='{\"dsr\":[71,116,1,0]}'> <span typeof=\"mw:Nowiki\" 
data-parsoid='{\"dsr\":[75,96,8,9]}'>::d3</span>                    
</dd></dl></dt></dl></dt></dl>\n");
 add("html2html", "Definition Lists: colons and tables 1", "<dl 
data-parsoid='{\"dsr\":[0,26,0,0]}'><dd data-parsoid='{\"dsr\":[0,12,1,0]}'> 
<table data-parsoid='{\"dsr\":[2,12,2,2]}'>\n\n<tbody 
data-parsoid='{\"dsr\":[6,10,0,0]}'><tr 
data-parsoid='{\"autoInsertedEnd\":true,\"autoInsertedStart\":true,\"dsr\":[6,9,0,0]}'><td
 data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[6,9,1,0]}'> 
x</td></tr>\n</tbody></table></dd>\n\n<dd data-parsoid='{\"dsr\":[14,26,1,0]}'> 
<table data-parsoid='{\"dsr\":[16,26,2,2]}'>\n\n<tbody 
data-parsoid='{\"dsr\":[20,24,0,0]}'><tr 
data-parsoid='{\"autoInsertedEnd\":true,\"autoInsertedStart\":true,\"dsr\":[20,23,0,0]}'><td
 data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[20,23,1,0]}'> 
y</td></tr>\n</tbody></table></dd></dl>\n");
-add("html2html", "External links: Free with trailing punctuation", "<p 
data-parsoid='{\"dsr\":[0,198,0,0]}'><a rel=\"mw:ExtLink\" 
href=\"http://example.com\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[0,18,0,0]}'>http://example.com</a>,\n<a 
rel=\"mw:ExtLink\" href=\"http://example.com;\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[20,39,0,0]}'>http://example.com;</a>\n<a
 rel=\"mw:ExtLink\" href=\"http://example.com\\\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[40,59,0,0]}'>http://example.com\\</a>\n<a
 rel=\"mw:ExtLink\" href=\"http://example.com\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[60,78,0,0]}'>http://example.com</a>.\n<a
 rel=\"mw:ExtLink\" href=\"http://example.com\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[80,98,0,0]}'>http://example.com</a>:\n<a
 rel=\"mw:ExtLink\" href=\"http://example.com!\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[100,119,0,0]}'>http://example.com!</a>\n<a
 rel=\"mw:ExtLink\" href=\"http://example.com?\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[120,139,0,0]}'>http://example.com?</a>\n<a
 rel=\"mw:ExtLink\" href=\"http://example.com\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[140,158,0,0]}'>http://example.com</a>)\n<a
 rel=\"mw:ExtLink\" href=\"http://example.com/url_with_(brackets)\" 
data-parsoid='{\"stx\":\"url\",\"dsr\":[160,198,0,0]}'>http://example.com/url_with_(brackets)</a></p>\n");
+add("html2html", "External links: Free with trailing punctuation", "<p 
data-parsoid='{\"dsr\":[0,475,0,0]}'><a rel=\"mw:ExtLink\" 
href=\"http://example.com\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[0,18,0,0]}'>http://example.com</a>,\n<a 
rel=\"mw:ExtLink\" href=\"http://example.com;\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[20,39,0,0]}'>http://example.com;</a>\n<a
 rel=\"mw:ExtLink\" href=\"http://example.com\\\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[40,59,0,0]}'>http://example.com\\</a>\n<a
 rel=\"mw:ExtLink\" href=\"http://example.com\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[60,78,0,0]}'>http://example.com</a>.\n<a
 rel=\"mw:ExtLink\" href=\"http://example.com\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[80,98,0,0]}'>http://example.com</a>:\n<a
 rel=\"mw:ExtLink\" href=\"http://example.com!\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[100,119,0,0]}'>http://example.com!</a>\n<a
 rel=\"mw:ExtLink\" href=\"http://example.com?\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[120,139,0,0]}'>http://example.com?</a>\n<a
 rel=\"mw:ExtLink\" href=\"http://example.com\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[140,158,0,0]}'>http://example.com</a>)\n<a
 rel=\"mw:ExtLink\" href=\"http://example.com/url_with_(brackets)\" 
data-parsoid='{\"stx\":\"url\",\"dsr\":[160,198,0,0]}'>http://example.com/url_with_(brackets)</a>\n(<a
 rel=\"mw:ExtLink\" href=\"http://example.com/url_without_brackets\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[200,239,0,0]}'>http://example.com/url_without_brackets</a>)\n<a
 rel=\"mw:ExtLink\" href=\"http://example.com/url_with_entity \"; 
data-parsoid='{\"stx\":\"url\",\"a\":{\"href\":\"http://example.com/url_with_entity
 
\"},\"sa\":{\"href\":\"http://example.com/url_with_entity&amp;nbsp;\"},\"dsr\":[241,281,0,0]}'>http://example.com/url_with_entity
 </a>\n<a rel=\"mw:ExtLink\" href=\"http://example.com/url_with_entity \"; 
data-parsoid='{\"stx\":\"url\",\"a\":{\"href\":\"http://example.com/url_with_entity
 
\"},\"sa\":{\"href\":\"http://example.com/url_with_entity&amp;nbsp;\"},\"dsr\":[282,322,0,0]}'>http://example.com/url_with_entity
 </a>\n<a rel=\"mw:ExtLink\" href=\"http://example.com/url_with_entity \"; 
data-parsoid='{\"stx\":\"url\",\"a\":{\"href\":\"http://example.com/url_with_entity
 
\"},\"sa\":{\"href\":\"http://example.com/url_with_entity&amp;nbsp;\"},\"dsr\":[323,363,0,0]}'>http://example.com/url_with_entity
 </a>\n<a rel=\"mw:ExtLink\" href=\"http://example.com/url_with_entity\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[364,398,0,0]}'>http://example.com/url_with_entity</a>&lt;\n<a
 rel=\"mw:ExtLink\" href=\"http://example.com/url_with_entity%3C\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[400,437,0,0]}'>http://example.com/url_with_entity%3C</a>\n<a
 rel=\"mw:ExtLink\" href=\"http://example.com/url_with_entity%3C\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[438,475,0,0]}'>http://example.com/url_with_entity%3C</a></p>\n");
+add("html2html", "External links: No preceding word characters allowed (bug 
65278)", "<p data-parsoid='{\"dsr\":[0,87,0,0]}'>NOPE<a rel=\"mw:ExtLink\" 
href=\"http://example.com\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[4,22,0,0]}'>http://example.com</a>\nN0<a
 rel=\"mw:ExtLink\" href=\"http://example.com\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[25,43,0,0]}'>http://example.com</a>\nok:<a
 rel=\"mw:ExtLink\" href=\"http://example.com\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[47,65,0,0]}'>http://example.com</a>\nok-<a
 rel=\"mw:ExtLink\" href=\"http://example.com\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[69,87,0,0]}'>http://example.com</a></p>\n");
 add("html2html", "External links: Clickable images", "<p 
data-parsoid='{\"dsr\":[0,78,0,0]}'>ja-style clickable images: <img 
src=\"http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png\"; 
alt=\"Ncwikicol.png\" rel=\"mw:externalImage\" 
data-parsoid='{\"dsr\":[27,78,null,null]}'/></p>\n");
 add("html2html", "Indented table markup mixed with indented pre content 
(proposed in bug 6200)", " <table 
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[1,58,2,0]}'>\n \n <tbody 
data-parsoid='{\"dsr\":[7,58,0,0]}'><tr 
data-parsoid='{\"autoInsertedEnd\":true,\"autoInsertedStart\":true,\"dsr\":[7,58,0,0]}'><td
 data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[7,58,1,0]}'>\n<pre 
data-parsoid='{\"dsr\":[9,58,1,0]}'>Text that should be rendered preformatted 
\n\n|}</pre></td></tr></tbody></table>\n");
+add("html2html", "Build table with wikilink", "<table class=\"wikitable\" 
data-parsoid='{\"dsr\":[0,216,20,2]}'>\n\n<tbody 
data-parsoid='{\"dsr\":[22,214,0,0]}'><tr 
data-parsoid='{\"autoInsertedEnd\":true,\"autoInsertedStart\":true,\"dsr\":[22,47,0,0]}'><th
 data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[22,31,1,0]}'> header 
</th>\n<th data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[32,47,1,0]}'> 
second header</th></tr>\n\n<tr style=\"color:red;\" 
data-parsoid='{\"startTagSrc\":\"|-\",\"autoInsertedEnd\":true,\"dsr\":[49,148,21,0]}'>\n<td
 data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[71,106,1,0]}'> data <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\":[78,105,17,2]}'>linktext</a> </td>\n<td 
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[107,148,1,0]}'> second data <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\":[121,148,17,2]}'>linktext</a></td></tr>\n\n<tr 
data-parsoid='{\"startTagSrc\":\"|-\",\"autoInsertedEnd\":true,\"dsr\":[150,213,2,0]}'>\n<td
 data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[153,160,1,0]}'> data 
</td>\n<td data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[161,213,1,0]}'> 
second data <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\":[175,213,17,2]}'>link|text with 
pipe</a></td></tr>\n</tbody></table>\n");
 add("html2html", "Plain link, capitalized", "<p 
data-parsoid='{\"dsr\":[0,28,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,28,17,2]}'>Main Page</a></p>\n");
 add("html2html", "Plain link, uncapitalized", "<p 
data-parsoid='{\"dsr\":[0,28,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,28,17,2]}'>main Page</a></p>\n");
 add("html2html", "Piped link", "<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");
@@ -605,6 +613,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&amp;action=edit&amp;redlink=1
 
Template:CurrentMonth]\n[/index.php?title=Template:Currentday&amp;action=edit&amp;redlink=1
 
Template:Currentday]\n[/index.php?title=Template:CURreNTweEK&amp;action=edit&amp;redlink=1
 
Template:CURreNTweEK]\n[/index.php?title=Template:CurrentHour&amp;action=edit&amp;redlink=1
 Template:CurrentHour]</p>\n");
 add("html2html", "Magic links: internal link to RFC (bug 479)", "<p 
data-parsoid='{\"dsr\":[0,56,0,0]}'>[/index.php?title=RFC_123&amp;action=edit&amp;redlink=1
 <a href=\"//tools.ietf.org/html/rfc123\" rel=\"mw:ExtLink\" 
data-parsoid='{\"stx\":\"magiclink\",\"dsr\":[48,55,0,0]}'>RFC 123</a>]</p>\n");
 add("html2html", "Magic links: ISBN (bug 1937)", "<p 
data-parsoid='{\"dsr\":[0,58,0,0]}'><a rel=\"mw:WikiLink\" 
href=\"./Wiki/Special:BookSources/0306406152\" 
title=\"Wiki/Special:BookSources/0306406152\" 
data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Special:BookSources/0306406152\"},\"sa\":{\"href\":\"wiki/Special:BookSources/0306406152\"},\"dsr\":[0,58,38,2]}'>ISBN
 0-306-40615-2</a></p>\n");
+add("html2html", "Magic links: ISBN (bug 65278)", "<p 
data-parsoid='{\"dsr\":[0,141,0,0]}'>This is <a rel=\"mw:WikiLink\" 
href=\"./Wiki/Special:BookSources/9780316098113\" 
title=\"Wiki/Special:BookSources/9780316098113\" 
data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Special:BookSources/9780316098113\"},\"sa\":{\"href\":\"wiki/Special:BookSources/9780316098113\"},\"dsr\":[8,73,41,2]}'>ISBN
 978-0-316-09811-3</a> but this<a href=\"./Special:BookSources/9780316098113\" 
rel=\"mw:ExtLink\" 
data-parsoid='{\"stx\":\"magiclink\",\"dsr\":[82,104,0,0]}'>ISBN 
978-0-316-09811-3</a> is not ISBN 978-0-316-09811-3linked.</p>\n");
 add("html2html", "Nonexistent template", "<p 
data-parsoid='{\"dsr\":[0,108,0,0]}'>[/index.php?title=Template:Thistemplatedoesnotexist&amp;action=edit&amp;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 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");
@@ -791,11 +800,11 @@
 add("html2html", "Special:Search page linking.", "<p 
data-parsoid='{\"dsr\":[0,38,0,0]}'><a rel=\"mw:WikiLink\" 
href=\"./Wiki/Special:Search\" title=\"Wiki/Special:Search\" 
data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Special:Search\"},\"sa\":{\"href\":\"wiki/Special:Search\"},\"dsr\":[0,38,22,2]}'>Special:Search</a></p>\n");
 add("html2html", "Say the magic word", "<ul 
data-parsoid='{\"dsr\":[0,312,0,0]}'><li data-parsoid='{\"dsr\":[0,13,1,0]}'> 
Parser test</li>\n<li data-parsoid='{\"dsr\":[14,27,1,0]}'> 
Parser_test</li>\n<li data-parsoid='{\"dsr\":[28,41,1,0]}'> Parser 
test</li>\n<li data-parsoid='{\"dsr\":[42,55,1,0]}'> Parser_test</li>\n<li 
data-parsoid='{\"dsr\":[56,69,1,0]}'> Parser test</li>\n<li 
data-parsoid='{\"dsr\":[70,83,1,0]}'> Parser_test</li>\n<li 
data-parsoid='{\"dsr\":[84,97,1,0]}'> Parser test</li>\n<li 
data-parsoid='{\"dsr\":[98,111,1,0]}'> Parser_test</li>\n<li 
data-parsoid='{\"dsr\":[112,125,1,0]}'> Parser test</li>\n<li 
data-parsoid='{\"dsr\":[126,139,1,0]}'> Parser_test</li>\n<li 
data-parsoid='{\"dsr\":[140,158,1,0]}'> Talk:Parser test</li>\n<li 
data-parsoid='{\"dsr\":[159,177,1,0]}'> Talk:Parser_test</li>\n<li 
data-parsoid='{\"dsr\":[178,191,1,0]}'> Parser test</li>\n<li 
data-parsoid='{\"dsr\":[192,205,1,0]}'> Parser_test</li>\n<li 
data-parsoid='{\"dsr\":[206,208,1,0]}'> </li>\n<li 
data-parsoid='{\"dsr\":[209,211,1,0]}'> </li>\n<li 
data-parsoid='{\"dsr\":[212,215,1,0]}'> 0</li>\n<li 
data-parsoid='{\"dsr\":[216,222,1,0]}'> Talk</li>\n<li 
data-parsoid='{\"dsr\":[223,229,1,0]}'> Talk</li>\n<li 
data-parsoid='{\"dsr\":[230,232,1,0]}'> </li>\n<li 
data-parsoid='{\"dsr\":[233,235,1,0]}'> </li>\n<li 
data-parsoid='{\"dsr\":[236,312,1,0]}'> 
[/index.php?title=Template:Dynamic&amp;action=edit&amp;redlink=1 
Template:Dynamic]</li></ul>\n");
 add("html2html", "Gallery", "<p data-parsoid='{\"dsr\":[0,4,0,0]}'>\t\t* 
</p><div style=\"width: 155px\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[4,139,26,6]}'>\n\t\t\t<div 
class=\"thumb\" style=\"height: 150px;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[34,92,42,6]}'>Image1.png</div>\n\t\t\t<div
 class=\"gallerytext\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[96,130,25,6]}'>\t\t\t</div>\n\t\t</div>\n<p
 data-parsoid='{\"dsr\":[140,144,0,0]}'>\t\t* </p><div style=\"width: 155px\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[144,286,26,6]}'>\n\t\t\t<div 
class=\"thumb\" style=\"height: 150px;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[174,232,42,6]}'>Image2.gif</div>\n\t\t\t<div
 class=\"gallerytext\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[236,277,25,6]}'>\n<p 
data-parsoid='{\"dsr\":[262,266,0,0]}'>||||</p>\n\n\t\t\t</div>\n\t\t</div>\n<p 
data-parsoid='{\"dsr\":[287,291,0,0]}'>\t\t* </p><div style=\"width: 155px\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[291,422,26,6]}'>\n\t\t\t<div 
class=\"thumb\" style=\"height: 150px;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[321,375,42,6]}'>Image3</div>\n\t\t\t<div
 class=\"gallerytext\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[379,413,25,6]}'>\t\t\t</div>\n\t\t</div>\n<p
 data-parsoid='{\"dsr\":[423,427,0,0]}'>\t\t* </p><div style=\"width: 155px\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[427,574,26,6]}'>\n\t\t\t<div 
class=\"thumb\" style=\"height: 150px;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[457,511,42,6]}'>Image4</div>\n\t\t\t<div
 class=\"gallerytext\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[515,565,25,6]}'>\n<p 
data-parsoid='{\"dsr\":[541,554,0,0]}'>300px| 
centre</p>\n\n\t\t\t</div>\n\t\t</div>\n<p 
data-parsoid='{\"dsr\":[575,579,0,0]}'>\t\t* </p><div style=\"width: 155px\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[579,731,26,6]}'>\n\t\t\t<div 
class=\"thumb\" style=\"height: 150px;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[609,667,42,6]}'>Image5.svg</div>\n\t\t\t<div
 class=\"gallerytext\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[671,722,25,6]}'>\n<p 
data-parsoid='{\"dsr\":[697,711,0,0]}'><a rel=\"mw:ExtLink\" 
href=\"http://///////\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[697,711,0,0]}'>http://///////</a></p>\n\n\t\t\t</div>\n\t\t</div>\n<p
 data-parsoid='{\"dsr\":[732,736,0,0]}'>\t\t* </p><div style=\"width: 155px\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[736,869,26,6]}'>\n\t\t\t<div 
class=\"thumb\" style=\"height: 150px;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[766,822,42,6]}'>* 
image6</div>\n\t\t\t<div class=\"gallerytext\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[826,860,25,6]}'>\t\t\t</div>\n\t\t</div>\n");
-add("html2html", "Gallery (with options)", "<p 
data-parsoid='{\"dsr\":[0,35,0,0]}'>\t* Foo <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\":[7,35,17,2]}'>Main Page</a></p>\n<p 
data-parsoid='{\"dsr\":[36,40,0,0]}'>\t\t* </p><div style=\"width: 105px\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[40,189,26,6]}'>\n\t\t\t<div 
class=\"thumb\" style=\"height: 70px;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[70,132,41,6]}'>Nonexistant.jpg</div>\n\t\t\t<div
 class=\"gallerytext\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[136,180,25,6]}'>\n<p 
data-parsoid='{\"dsr\":[162,169,0,0]}'>caption</p>\n\n\t\t\t</div>\n\t\t</div>\n<p
 data-parsoid='{\"dsr\":[190,194,0,0]}'>\t\t* </p><div style=\"width: 105px\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[194,333,26,6]}'>\n\t\t\t<div 
class=\"thumb\" style=\"height: 70px;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[224,286,41,6]}'>Nonexistant.jpg</div>\n\t\t\t<div
 class=\"gallerytext\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[290,324,25,6]}'>\t\t\t</div>\n\t\t</div>\n<p
 data-parsoid='{\"dsr\":[334,338,0,0]}'>\t\t* </p><div style=\"width: 105px\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[338,612,26,6]}'>\n\t\t\t<div 
class=\"thumb\" style=\"width: 100px;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[368,515,41,6]}'><div 
style=\"margin:31px auto;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[409,509,31,6]}'><img 
src=\"http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg\"; 
alt=\"70px-Foobar.jpg\" rel=\"mw:externalImage\" 
data-parsoid='{\"dsr\":[440,503,null,null]}'/></div></div>\n\t\t\t<div 
class=\"gallerytext\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[519,603,25,6]}'>\n<p 
data-parsoid='{\"dsr\":[545,592,0,0]}'>some <b 
data-parsoid='{\"dsr\":[550,563,3,3]}'>caption</b> <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\":[564,592,17,2]}'>Main 
Page</a></p>\n\n\t\t\t</div>\n\t\t</div>\n<p 
data-parsoid='{\"dsr\":[613,617,0,0]}'>\t\t* </p><div style=\"width: 105px\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[617,841,26,6]}'>\n\t\t\t<div 
class=\"thumb\" style=\"width: 100px;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[647,794,41,6]}'><div 
style=\"margin:31px auto;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[688,788,31,6]}'><img 
src=\"http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg\"; 
alt=\"70px-Foobar.jpg\" rel=\"mw:externalImage\" 
data-parsoid='{\"dsr\":[719,782,null,null]}'/></div></div>\n\t\t\t<div 
class=\"gallerytext\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[798,832,25,6]}'>\t\t\t</div>\n\t\t</div>\n<p
 data-parsoid='{\"dsr\":[842,846,0,0]}'>\t\t* </p><div style=\"width: 105px\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[846,1087,26,6]}'>\n\t\t\t<div 
class=\"thumb\" style=\"width: 100px;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[876,1023,41,6]}'><div 
style=\"margin:31px auto;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[917,1017,31,6]}'><img 
src=\"http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg\"; 
alt=\"70px-Foobar.jpg\" rel=\"mw:externalImage\" 
data-parsoid='{\"dsr\":[948,1011,null,null]}'/></div></div>\n\t\t\t<div 
class=\"gallerytext\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[1027,1078,25,6]}'>\n<p 
data-parsoid='{\"dsr\":[1053,1067,0,0]}'>Blabla|blabla.</p>\n\n\t\t\t</div>\n\t\t</div>\n");
+add("html2html", "Gallery (with options)", "<p 
data-parsoid='{\"dsr\":[0,35,0,0]}'>\t* Foo <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\":[7,35,17,2]}'>Main Page</a></p>\n<p 
data-parsoid='{\"dsr\":[36,40,0,0]}'>\t\t* </p><div style=\"width: 105px\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[40,189,26,6]}'>\n\t\t\t<div 
class=\"thumb\" style=\"height: 70px;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[70,132,41,6]}'>Nonexistent.jpg</div>\n\t\t\t<div
 class=\"gallerytext\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[136,180,25,6]}'>\n<p 
data-parsoid='{\"dsr\":[162,169,0,0]}'>caption</p>\n\n\t\t\t</div>\n\t\t</div>\n<p
 data-parsoid='{\"dsr\":[190,194,0,0]}'>\t\t* </p><div style=\"width: 105px\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[194,333,26,6]}'>\n\t\t\t<div 
class=\"thumb\" style=\"height: 70px;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[224,286,41,6]}'>Nonexistent.jpg</div>\n\t\t\t<div
 class=\"gallerytext\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[290,324,25,6]}'>\t\t\t</div>\n\t\t</div>\n<p
 data-parsoid='{\"dsr\":[334,338,0,0]}'>\t\t* </p><div style=\"width: 105px\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[338,612,26,6]}'>\n\t\t\t<div 
class=\"thumb\" style=\"width: 100px;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[368,515,41,6]}'><div 
style=\"margin:31px auto;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[409,509,31,6]}'><img 
src=\"http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg\"; 
alt=\"70px-Foobar.jpg\" rel=\"mw:externalImage\" 
data-parsoid='{\"dsr\":[440,503,null,null]}'/></div></div>\n\t\t\t<div 
class=\"gallerytext\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[519,603,25,6]}'>\n<p 
data-parsoid='{\"dsr\":[545,592,0,0]}'>some <b 
data-parsoid='{\"dsr\":[550,563,3,3]}'>caption</b> <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\":[564,592,17,2]}'>Main 
Page</a></p>\n\n\t\t\t</div>\n\t\t</div>\n<p 
data-parsoid='{\"dsr\":[613,617,0,0]}'>\t\t* </p><div style=\"width: 105px\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[617,841,26,6]}'>\n\t\t\t<div 
class=\"thumb\" style=\"width: 100px;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[647,794,41,6]}'><div 
style=\"margin:31px auto;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[688,788,31,6]}'><img 
src=\"http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg\"; 
alt=\"70px-Foobar.jpg\" rel=\"mw:externalImage\" 
data-parsoid='{\"dsr\":[719,782,null,null]}'/></div></div>\n\t\t\t<div 
class=\"gallerytext\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[798,832,25,6]}'>\t\t\t</div>\n\t\t</div>\n<p
 data-parsoid='{\"dsr\":[842,846,0,0]}'>\t\t* </p><div style=\"width: 105px\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[846,1087,26,6]}'>\n\t\t\t<div 
class=\"thumb\" style=\"width: 100px;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[876,1023,41,6]}'><div 
style=\"margin:31px auto;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[917,1017,31,6]}'><img 
src=\"http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg\"; 
alt=\"70px-Foobar.jpg\" rel=\"mw:externalImage\" 
data-parsoid='{\"dsr\":[948,1011,null,null]}'/></div></div>\n\t\t\t<div 
class=\"gallerytext\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[1027,1078,25,6]}'>\n<p 
data-parsoid='{\"dsr\":[1053,1067,0,0]}'>Blabla|blabla.</p>\n\n\t\t\t</div>\n\t\t</div>\n");
 add("html2html", "Gallery with link that has fragment", "<p 
data-parsoid='{\"dsr\":[0,4,0,0]}'>\t\t* </p><div style=\"width: 155px\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[4,229,26,6]}'>\n\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>\n\t\t\t<div 
class=\"gallerytext\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[186,220,25,6]}'>\t\t\t</div>\n\t\t</div>\n<p
 data-parsoid='{\"dsr\":[230,234,0,0]}'>\t\t* </p><div style=\"width: 155px\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[234,459,26,6]}'>\n\t\t\t<div 
class=\"thumb\" style=\"width: 150px;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[264,412,41,6]}'><div 
style=\"margin:68px auto;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[305,406,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\":[336,400,null,null]}'/></div></div>\n\t\t\t<div 
class=\"gallerytext\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[416,450,25,6]}'>\t\t\t</div>\n\t\t</div>\n<p
 data-parsoid='{\"dsr\":[460,464,0,0]}'>\t\t* </p><div style=\"width: 155px\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[464,699,26,6]}'>\n\t\t\t<div 
class=\"thumb\" style=\"width: 150px;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[494,642,41,6]}'><div 
style=\"margin:68px auto;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[535,636,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\":[566,630,null,null]}'/></div></div>\n\t\t\t<div 
class=\"gallerytext\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[646,690,25,6]}'>\n<p 
data-parsoid='{\"dsr\":[672,679,0,0]}'>caption</p>\n\n\t\t\t</div>\n\t\t</div>\n");
 add("html2html", "Gallery with wikitext inside caption", "<p 
data-parsoid='{\"dsr\":[0,4,0,0]}'>\t\t* </p><div style=\"width: 155px\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[4,295,26,6]}'>\n\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>\n\t\t\t<div 
class=\"gallerytext\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[186,286,25,6]}'>\n<p 
data-parsoid='{\"dsr\":[212,275,0,0]}'><img 
src=\"http://example.com/images/thumb/3/3a/Foobar.jpg/20px-Foobar.jpg\"; 
alt=\"20px-Foobar.jpg\" rel=\"mw:externalImage\" 
data-parsoid='{\"dsr\":[212,275,null,null]}'/></p>\n\n\t\t\t</div>\n\t\t</div>\n<p
 data-parsoid='{\"dsr\":[296,300,0,0]}'>\t\t* </p><div style=\"width: 155px\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[300,551,26,6]}'>\n\t\t\t<div 
class=\"thumb\" style=\"width: 150px;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[330,478,41,6]}'><div 
style=\"margin:68px auto;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[371,472,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\":[402,466,null,null]}'/></div></div>\n\t\t\t<div 
class=\"gallerytext\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[482,542,25,6]}'>\n<p 
data-parsoid='{\"dsr\":[508,531,0,0]}'>This is a test 
template</p>\n\n\t\t\t</div>\n\t\t</div>\n");
-add("html2html", "gallery (with showfilename option)", "<p 
data-parsoid='{\"dsr\":[0,4,0,0]}'>\t\t* </p><div style=\"width: 155px\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[4,200,26,6]}'>\n\t\t\t<div 
class=\"thumb\" style=\"height: 150px;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[34,97,42,6]}'>Nonexistant.jpg</div>\n\t\t\t<div
 class=\"gallerytext\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[101,191,25,6]}'>\n<p 
data-parsoid='{\"dsr\":[127,180,0,0]}'><a rel=\"mw:WikiLink\" 
href=\"./Wiki/File:Nonexistant.jpg\" title=\"Wiki/File:Nonexistant.jpg\" 
data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/File:Nonexistant.jpg\"},\"sa\":{\"href\":\"wiki/File:Nonexistant.jpg\"},\"dsr\":[127,172,28,2]}'>Nonexistant.jpg</a>\ncaption</p>\n\n\t\t\t</div>\n\t\t</div>\n<p
 data-parsoid='{\"dsr\":[201,205,0,0]}'>\t\t* </p><div style=\"width: 155px\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[205,393,26,6]}'>\n\t\t\t<div 
class=\"thumb\" style=\"height: 150px;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[235,298,42,6]}'>Nonexistant.jpg</div>\n\t\t\t<div
 class=\"gallerytext\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[302,384,25,6]}'>\n<p 
data-parsoid='{\"dsr\":[328,373,0,0]}'><a rel=\"mw:WikiLink\" 
href=\"./Wiki/File:Nonexistant.jpg\" title=\"Wiki/File:Nonexistant.jpg\" 
data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/File:Nonexistant.jpg\"},\"sa\":{\"href\":\"wiki/File:Nonexistant.jpg\"},\"dsr\":[328,373,28,2]}'>Nonexistant.jpg</a></p>\n\n\t\t\t</div>\n\t\t</div>\n<p
 data-parsoid='{\"dsr\":[394,398,0,0]}'>\t\t* </p><div style=\"width: 155px\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[398,709,26,6]}'>\n\t\t\t<div 
class=\"thumb\" style=\"width: 150px;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[428,576,41,6]}'><div 
style=\"margin:68px auto;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[469,570,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\":[500,564,null,null]}'/></div></div>\n\t\t\t<div 
class=\"gallerytext\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[580,700,25,6]}'>\n<p 
data-parsoid='{\"dsr\":[606,689,0,0]}'><a rel=\"mw:WikiLink\" 
href=\"./Wiki/File:Foobar.jpg\" title=\"Wiki/File:Foobar.jpg\" 
data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/File:Foobar.jpg\"},\"sa\":{\"href\":\"wiki/File:Foobar.jpg\"},\"dsr\":[606,641,23,2]}'>Foobar.jpg</a>\nsome
 <b data-parsoid='{\"dsr\":[647,660,3,3]}'>caption</b> <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\":[661,689,17,2]}'>Main 
Page</a></p>\n\n\t\t\t</div>\n\t\t</div>\n<p 
data-parsoid='{\"dsr\":[710,714,0,0]}'>\t\t* </p><div style=\"width: 155px\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[714,977,26,6]}'>\n\t\t\t<div 
class=\"thumb\" style=\"width: 150px;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[744,892,41,6]}'><div 
style=\"margin:68px auto;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[785,886,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\":[816,880,null,null]}'/></div></div>\n\t\t\t<div 
class=\"gallerytext\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[896,968,25,6]}'>\n<p 
data-parsoid='{\"dsr\":[922,957,0,0]}'><a rel=\"mw:WikiLink\" 
href=\"./Wiki/File:Foobar.jpg\" title=\"Wiki/File:Foobar.jpg\" 
data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/File:Foobar.jpg\"},\"sa\":{\"href\":\"wiki/File:Foobar.jpg\"},\"dsr\":[922,957,23,2]}'>Foobar.jpg</a></p>\n\n\t\t\t</div>\n\t\t</div>\n");
-add("html2html", "Gallery (with namespace-less filenames)", "<p 
data-parsoid='{\"dsr\":[0,4,0,0]}'>\t\t* </p><div style=\"width: 155px\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[4,144,26,6]}'>\n\t\t\t<div 
class=\"thumb\" style=\"height: 150px;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[34,97,42,6]}'>Nonexistant.jpg</div>\n\t\t\t<div
 class=\"gallerytext\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[101,135,25,6]}'>\t\t\t</div>\n\t\t</div>\n<p
 data-parsoid='{\"dsr\":[145,149,0,0]}'>\t\t* </p><div style=\"width: 155px\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[149,289,26,6]}'>\n\t\t\t<div 
class=\"thumb\" style=\"height: 150px;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[179,242,42,6]}'>Nonexistant.jpg</div>\n\t\t\t<div
 class=\"gallerytext\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[246,280,25,6]}'>\t\t\t</div>\n\t\t</div>\n<p
 data-parsoid='{\"dsr\":[290,294,0,0]}'>\t\t* </p><div style=\"width: 155px\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[294,519,26,6]}'>\n\t\t\t<div 
class=\"thumb\" style=\"width: 150px;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[324,472,41,6]}'><div 
style=\"margin:68px auto;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[365,466,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\":[396,460,null,null]}'/></div></div>\n\t\t\t<div 
class=\"gallerytext\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[476,510,25,6]}'>\t\t\t</div>\n\t\t</div>\n<p
 data-parsoid='{\"dsr\":[520,524,0,0]}'>\t\t* </p><div style=\"width: 155px\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[524,749,26,6]}'>\n\t\t\t<div 
class=\"thumb\" style=\"width: 150px;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[554,702,41,6]}'><div 
style=\"margin:68px auto;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[595,696,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\":[626,690,null,null]}'/></div></div>\n\t\t\t<div 
class=\"gallerytext\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[706,740,25,6]}'>\t\t\t</div>\n\t\t</div>\n");
+add("html2html", "gallery (with showfilename option)", "<p 
data-parsoid='{\"dsr\":[0,4,0,0]}'>\t\t* </p><div style=\"width: 155px\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[4,200,26,6]}'>\n\t\t\t<div 
class=\"thumb\" style=\"height: 150px;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[34,97,42,6]}'>Nonexistent.jpg</div>\n\t\t\t<div
 class=\"gallerytext\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[101,191,25,6]}'>\n<p 
data-parsoid='{\"dsr\":[127,180,0,0]}'><a rel=\"mw:WikiLink\" 
href=\"./Wiki/File:Nonexistent.jpg\" title=\"Wiki/File:Nonexistent.jpg\" 
data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/File:Nonexistent.jpg\"},\"sa\":{\"href\":\"wiki/File:Nonexistent.jpg\"},\"dsr\":[127,172,28,2]}'>Nonexistent.jpg</a>\ncaption</p>\n\n\t\t\t</div>\n\t\t</div>\n<p
 data-parsoid='{\"dsr\":[201,205,0,0]}'>\t\t* </p><div style=\"width: 155px\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[205,393,26,6]}'>\n\t\t\t<div 
class=\"thumb\" style=\"height: 150px;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[235,298,42,6]}'>Nonexistent.jpg</div>\n\t\t\t<div
 class=\"gallerytext\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[302,384,25,6]}'>\n<p 
data-parsoid='{\"dsr\":[328,373,0,0]}'><a rel=\"mw:WikiLink\" 
href=\"./Wiki/File:Nonexistent.jpg\" title=\"Wiki/File:Nonexistent.jpg\" 
data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/File:Nonexistent.jpg\"},\"sa\":{\"href\":\"wiki/File:Nonexistent.jpg\"},\"dsr\":[328,373,28,2]}'>Nonexistent.jpg</a></p>\n\n\t\t\t</div>\n\t\t</div>\n<p
 data-parsoid='{\"dsr\":[394,398,0,0]}'>\t\t* </p><div style=\"width: 155px\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[398,709,26,6]}'>\n\t\t\t<div 
class=\"thumb\" style=\"width: 150px;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[428,576,41,6]}'><div 
style=\"margin:68px auto;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[469,570,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\":[500,564,null,null]}'/></div></div>\n\t\t\t<div 
class=\"gallerytext\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[580,700,25,6]}'>\n<p 
data-parsoid='{\"dsr\":[606,689,0,0]}'><a rel=\"mw:WikiLink\" 
href=\"./Wiki/File:Foobar.jpg\" title=\"Wiki/File:Foobar.jpg\" 
data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/File:Foobar.jpg\"},\"sa\":{\"href\":\"wiki/File:Foobar.jpg\"},\"dsr\":[606,641,23,2]}'>Foobar.jpg</a>\nsome
 <b data-parsoid='{\"dsr\":[647,660,3,3]}'>caption</b> <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\":[661,689,17,2]}'>Main 
Page</a></p>\n\n\t\t\t</div>\n\t\t</div>\n<p 
data-parsoid='{\"dsr\":[710,714,0,0]}'>\t\t* </p><div style=\"width: 155px\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[714,977,26,6]}'>\n\t\t\t<div 
class=\"thumb\" style=\"width: 150px;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[744,892,41,6]}'><div 
style=\"margin:68px auto;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[785,886,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\":[816,880,null,null]}'/></div></div>\n\t\t\t<div 
class=\"gallerytext\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[896,968,25,6]}'>\n<p 
data-parsoid='{\"dsr\":[922,957,0,0]}'><a rel=\"mw:WikiLink\" 
href=\"./Wiki/File:Foobar.jpg\" title=\"Wiki/File:Foobar.jpg\" 
data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/File:Foobar.jpg\"},\"sa\":{\"href\":\"wiki/File:Foobar.jpg\"},\"dsr\":[922,957,23,2]}'>Foobar.jpg</a></p>\n\n\t\t\t</div>\n\t\t</div>\n");
+add("html2html", "Gallery (with namespace-less filenames)", "<p 
data-parsoid='{\"dsr\":[0,4,0,0]}'>\t\t* </p><div style=\"width: 155px\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[4,144,26,6]}'>\n\t\t\t<div 
class=\"thumb\" style=\"height: 150px;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[34,97,42,6]}'>Nonexistent.jpg</div>\n\t\t\t<div
 class=\"gallerytext\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[101,135,25,6]}'>\t\t\t</div>\n\t\t</div>\n<p
 data-parsoid='{\"dsr\":[145,149,0,0]}'>\t\t* </p><div style=\"width: 155px\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[149,289,26,6]}'>\n\t\t\t<div 
class=\"thumb\" style=\"height: 150px;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[179,242,42,6]}'>Nonexistent.jpg</div>\n\t\t\t<div
 class=\"gallerytext\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[246,280,25,6]}'>\t\t\t</div>\n\t\t</div>\n<p
 data-parsoid='{\"dsr\":[290,294,0,0]}'>\t\t* </p><div style=\"width: 155px\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[294,519,26,6]}'>\n\t\t\t<div 
class=\"thumb\" style=\"width: 150px;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[324,472,41,6]}'><div 
style=\"margin:68px auto;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[365,466,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\":[396,460,null,null]}'/></div></div>\n\t\t\t<div 
class=\"gallerytext\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[476,510,25,6]}'>\t\t\t</div>\n\t\t</div>\n<p
 data-parsoid='{\"dsr\":[520,524,0,0]}'>\t\t* </p><div style=\"width: 155px\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[524,749,26,6]}'>\n\t\t\t<div 
class=\"thumb\" style=\"width: 150px;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[554,702,41,6]}'><div 
style=\"margin:68px auto;\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[595,696,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\":[626,690,null,null]}'/></div></div>\n\t\t\t<div 
class=\"gallerytext\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[706,740,25,6]}'>\t\t\t</div>\n\t\t</div>\n");
 add("html2html", "__FORCETOC__ override", "\n");
 add("html2html", "ISBN code coverage", "<p 
data-parsoid='{\"dsr\":[0,62,0,0]}'><a rel=\"mw:WikiLink\" 
href=\"./Wiki/Special:BookSources/9780123456\" 
title=\"Wiki/Special:BookSources/9780123456\" 
data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Special:BookSources/9780123456\"},\"sa\":{\"href\":\"wiki/Special:BookSources/9780123456\"},\"dsr\":[0,58,38,2]}'>ISBN
 978-0-1234-56</a> 789</p>\n");
 add("html2html", "Double ISBN", "<p data-parsoid='{\"dsr\":[0,60,0,0]}'>ISBN 
<a rel=\"mw:WikiLink\" href=\"./Wiki/Special:BookSources/1234567890\" 
title=\"Wiki/Special:BookSources/1234567890\" 
data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Special:BookSources/1234567890\"},\"sa\":{\"href\":\"wiki/Special:BookSources/1234567890\"},\"dsr\":[5,60,38,2]}'>ISBN
 1234567890</a></p>\n");
@@ -1033,6 +1042,7 @@
 add("html2wt", "Definition Lists: colons occurring in tags", "; a\n: b\n; 
'''a:b'''\n; ''a:b''\n; <span>a:b</span>\n; <div>a:b</div>\n; a\n: b\n; 
''a:b''\n");
 add("html2wt", "Definition Lists: colons and tables 1", ": {|\n\n| x\n|}\n\n: 
{|\n\n| y\n|}\n");
 add("html2wt", "Definition Lists: colons and tables 2", ": {|\n\n| x\n|}\n: 
{|\n\n| y\n|}\n");
+add("html2wt", "External links: Free with trailing punctuation", 
"http://example.com,\nhttp://example.com;\nhttp://example.com\\\nhttp://example.com.\nhttp://example.com:\nhttp://example.com!\nhttp://example.com?\nhttp://example.com)\nhttp://example.com/url_with_(brackets)\n(http://example.com/url_without_brackets)\nhttp://example.com/url_with_entity&nbsp;\nhttp://example.com/url_with_entity&nbsp;\nhttp://example.com/url_with_entity&nbsp;\nhttp://example.com/url_with_entity<\nhttp://example.com/url_with_entity%3C\nhttp://example.com/url_with_entity%3C\n";);
 add("html2wt", "External links: URL in text", "URL in text: 
http://example.com\n";);
 add("html2wt", "External links: Clickable images", "ja-style clickable images: 
http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png\n";);
 add("html2wt", "External links: raw ampersand", "Old & use: http://x&y\n";);
@@ -1078,6 +1088,8 @@
 add("html2wt", "Wikitext table with double-line table cell", 
"{|\n\n|a\nb\n\n|}\n");
 add("html2wt", "Table cell with a single comment", "{|\n\n|\n\n| a\n|}\n");
 add("html2wt", "Build table with {{!}}", "{| class=\"wikitable\"\n\n! 
header\n\n! second header\n\n|- style=\"color:red;\"\n| data \n| 
style=\"color:red;\" | second data\n|}\n");
+add("html2wt", "Build table with pipe as data", "{| class=\"wikitable\"\n\n! 
header\n\n! second header\n\n|- style=\"color:red;\"\n| data \n| 
style=\"color:red;\" | second data\n\n|-\n| style=\"color:red;\" |<nowiki> data 
with | </nowiki>\n| style=\"color:red;\" |<nowiki> second data with 
|</nowiki>\n\n|-\n|<nowiki> data with | </nowiki>\n|<nowiki> second data with 
|</nowiki>\n|}\n");
+add("html2wt", "Build table with wikilink", "{| class=\"wikitable\"\n\n! 
header \n! second header\n\n|- style=\"color:red;\"\n| data [[wiki/Main 
Page|linktext]] \n| second data [[wiki/Main Page|linktext]]\n\n|-\n| data \n| 
second data [[wiki/Main Page|link|text with pipe]]\n|}\n");
 add("html2wt", "Wikitext table with html-syntax row", "{|\n\n|foo\n|}\n");
 add("html2wt", "Plain link, capitalized", "[[wiki/Main Page|Main Page]]\n");
 add("html2wt", "Plain link, uncapitalized", "[[wiki/Main Page|main Page]]\n");
@@ -1217,7 +1229,10 @@
 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", "Magic links: internal link to RFC (bug 479)", 
"[/index.php?title=RFC_123&action=edit&redlink=1 RFC 123]\n");
+add("html2wt", "Magic links: RFC (bug 65278)", "This is RFC 822<nowiki> but 
thisRFC 822 is not RFC 822linked.</nowiki>\n");
 add("html2wt", "Magic links: ISBN (bug 1937)", 
"[[wiki/Special:BookSources/0306406152|ISBN 0-306-40615-2]]\n");
+add("html2wt", "Magic links: ISBN (bug 65278)", "This is 
[[wiki/Special:BookSources/9780316098113|ISBN 978-0-316-09811-3]] but thisISBN 
978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.\n");
+add("html2wt", "Magic links: PMID (bug 65278)", "This is PMID 1234<nowiki> but 
thisPMID 1234 is not PMID 1234linked.</nowiki>\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");
@@ -1556,11 +1571,11 @@
 add("html2wt", "Special:Search page linking.", 
"[[wiki/Special:Search|Special:Search]]\n");
 add("html2wt", "Say the magic word", "* Parser test\n* Parser_test\n* Parser 
test\n* Parser_test\n* Parser test\n* Parser_test\n* Parser test\n* 
Parser_test\n* Parser test\n* Parser_test\n* Talk:Parser test\n* 
Talk:Parser_test\n* Parser test\n* Parser_test\n* \n* \n* 0\n* Talk\n* Talk\n* 
\n* \n* [/index.php?title=Template:Dynamic&action=edit&redlink=1 
Template:Dynamic]\n");
 add("html2wt", "Gallery", "\t\t* <div style=\"width: 155px\">\n\t\t\t<div 
class=\"thumb\" style=\"height: 150px;\">Image1.png</div>\n\t\t\t<div 
class=\"gallerytext\">\t\t\t</div>\n\t\t</div>\n\t\t* <div style=\"width: 
155px\">\n\t\t\t<div class=\"thumb\" style=\"height: 
150px;\">Image2.gif</div>\n\t\t\t<div 
class=\"gallerytext\">\n||||\n\n\t\t\t</div>\n\t\t</div>\n\t\t* <div 
style=\"width: 155px\">\n\t\t\t<div class=\"thumb\" style=\"height: 
150px;\">Image3</div>\n\t\t\t<div 
class=\"gallerytext\">\t\t\t</div>\n\t\t</div>\n\t\t* <div style=\"width: 
155px\">\n\t\t\t<div class=\"thumb\" style=\"height: 
150px;\">Image4</div>\n\t\t\t<div class=\"gallerytext\">\n300px| 
centre\n\n\t\t\t</div>\n\t\t</div>\n\t\t* <div style=\"width: 
155px\">\n\t\t\t<div class=\"thumb\" style=\"height: 
150px;\">Image5.svg</div>\n\t\t\t<div 
class=\"gallerytext\">\nhttp://///////\n\n\t\t\t</div>\n\t\t</div>\n\t\t* <div 
style=\"width: 155px\">\n\t\t\t<div class=\"thumb\" style=\"height: 150px;\">* 
image6</div>\n\t\t\t<div class=\"gallerytext\">\t\t\t</div>\n\t\t</div>\n");
-add("html2wt", "Gallery (with options)", "\t* Foo [[wiki/Main Page|Main 
Page]]\n\t\t* <div style=\"width: 105px\">\n\t\t\t<div class=\"thumb\" 
style=\"height: 70px;\">Nonexistant.jpg</div>\n\t\t\t<div 
class=\"gallerytext\">\ncaption\n\n\t\t\t</div>\n\t\t</div>\n\t\t* <div 
style=\"width: 105px\">\n\t\t\t<div class=\"thumb\" style=\"height: 
70px;\">Nonexistant.jpg</div>\n\t\t\t<div 
class=\"gallerytext\">\t\t\t</div>\n\t\t</div>\n\t\t* <div style=\"width: 
105px\">\n\t\t\t<div class=\"thumb\" style=\"width: 100px;\"><div 
style=\"margin:31px 
auto;\">http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg</div></div>\n\t\t\t<div
 class=\"gallerytext\">\nsome '''caption''' [[wiki/Main Page|Main 
Page]]\n\n\t\t\t</div>\n\t\t</div>\n\t\t* <div style=\"width: 
105px\">\n\t\t\t<div class=\"thumb\" style=\"width: 100px;\"><div 
style=\"margin:31px 
auto;\">http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg</div></div>\n\t\t\t<div
 class=\"gallerytext\">\t\t\t</div>\n\t\t</div>\n\t\t* <div style=\"width: 
105px\">\n\t\t\t<div class=\"thumb\" style=\"width: 100px;\"><div 
style=\"margin:31px 
auto;\">http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg</div></div>\n\t\t\t<div
 class=\"gallerytext\">\nBlabla|blabla.\n\n\t\t\t</div>\n\t\t</div>\n");
+add("html2wt", "Gallery (with options)", "\t* Foo [[wiki/Main Page|Main 
Page]]\n\t\t* <div style=\"width: 105px\">\n\t\t\t<div class=\"thumb\" 
style=\"height: 70px;\">Nonexistent.jpg</div>\n\t\t\t<div 
class=\"gallerytext\">\ncaption\n\n\t\t\t</div>\n\t\t</div>\n\t\t* <div 
style=\"width: 105px\">\n\t\t\t<div class=\"thumb\" style=\"height: 
70px;\">Nonexistent.jpg</div>\n\t\t\t<div 
class=\"gallerytext\">\t\t\t</div>\n\t\t</div>\n\t\t* <div style=\"width: 
105px\">\n\t\t\t<div class=\"thumb\" style=\"width: 100px;\"><div 
style=\"margin:31px 
auto;\">http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg</div></div>\n\t\t\t<div
 class=\"gallerytext\">\nsome '''caption''' [[wiki/Main Page|Main 
Page]]\n\n\t\t\t</div>\n\t\t</div>\n\t\t* <div style=\"width: 
105px\">\n\t\t\t<div class=\"thumb\" style=\"width: 100px;\"><div 
style=\"margin:31px 
auto;\">http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg</div></div>\n\t\t\t<div
 class=\"gallerytext\">\t\t\t</div>\n\t\t</div>\n\t\t* <div style=\"width: 
105px\">\n\t\t\t<div class=\"thumb\" style=\"width: 100px;\"><div 
style=\"margin:31px 
auto;\">http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg</div></div>\n\t\t\t<div
 class=\"gallerytext\">\nBlabla|blabla.\n\n\t\t\t</div>\n\t\t</div>\n");
 add("html2wt", "Gallery with link that has fragment", "\t\t* <div 
style=\"width: 155px\">\n\t\t\t<div class=\"thumb\" style=\"width: 
150px;\"><div style=\"margin:68px 
auto;\">http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg</div></div>\n\t\t\t<div
 class=\"gallerytext\">\t\t\t</div>\n\t\t</div>\n\t\t* <div style=\"width: 
155px\">\n\t\t\t<div class=\"thumb\" style=\"width: 150px;\"><div 
style=\"margin:68px 
auto;\">http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg</div></div>\n\t\t\t<div
 class=\"gallerytext\">\t\t\t</div>\n\t\t</div>\n\t\t* <div style=\"width: 
155px\">\n\t\t\t<div class=\"thumb\" style=\"width: 150px;\"><div 
style=\"margin:68px 
auto;\">http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg</div></div>\n\t\t\t<div
 class=\"gallerytext\">\ncaption\n\n\t\t\t</div>\n\t\t</div>\n");
 add("html2wt", "Gallery with wikitext inside caption", "\t\t* <div 
style=\"width: 155px\">\n\t\t\t<div class=\"thumb\" style=\"width: 
150px;\"><div style=\"margin:68px 
auto;\">http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg</div></div>\n\t\t\t<div
 
class=\"gallerytext\">\nhttp://example.com/images/thumb/3/3a/Foobar.jpg/20px-Foobar.jpg\n\n\t\t\t</div>\n\t\t</div>\n\t\t*
 <div style=\"width: 155px\">\n\t\t\t<div class=\"thumb\" style=\"width: 
150px;\"><div style=\"margin:68px 
auto;\">http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg</div></div>\n\t\t\t<div
 class=\"gallerytext\">\nThis is a test 
template\n\n\t\t\t</div>\n\t\t</div>\n");
-add("html2wt", "gallery (with showfilename option)", "\t\t* <div 
style=\"width: 155px\">\n\t\t\t<div class=\"thumb\" style=\"height: 
150px;\">Nonexistant.jpg</div>\n\t\t\t<div 
class=\"gallerytext\">\n[[wiki/File:Nonexistant.jpg|Nonexistant.jpg]]\ncaption\n\n\t\t\t</div>\n\t\t</div>\n\t\t*
 <div style=\"width: 155px\">\n\t\t\t<div class=\"thumb\" style=\"height: 
150px;\">Nonexistant.jpg</div>\n\t\t\t<div 
class=\"gallerytext\">\n[[wiki/File:Nonexistant.jpg|Nonexistant.jpg]]\n\n\t\t\t</div>\n\t\t</div>\n\t\t*
 <div style=\"width: 155px\">\n\t\t\t<div class=\"thumb\" style=\"width: 
150px;\"><div style=\"margin:68px 
auto;\">http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg</div></div>\n\t\t\t<div
 class=\"gallerytext\">\n[[wiki/File:Foobar.jpg|Foobar.jpg]]\nsome 
'''caption''' [[wiki/Main Page|Main Page]]\n\n\t\t\t</div>\n\t\t</div>\n\t\t* 
<div style=\"width: 155px\">\n\t\t\t<div class=\"thumb\" style=\"width: 
150px;\"><div style=\"margin:68px 
auto;\">http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg</div></div>\n\t\t\t<div
 
class=\"gallerytext\">\n[[wiki/File:Foobar.jpg|Foobar.jpg]]\n\n\t\t\t</div>\n\t\t</div>\n");
-add("html2wt", "Gallery (with namespace-less filenames)", "\t\t* <div 
style=\"width: 155px\">\n\t\t\t<div class=\"thumb\" style=\"height: 
150px;\">Nonexistant.jpg</div>\n\t\t\t<div 
class=\"gallerytext\">\t\t\t</div>\n\t\t</div>\n\t\t* <div style=\"width: 
155px\">\n\t\t\t<div class=\"thumb\" style=\"height: 
150px;\">Nonexistant.jpg</div>\n\t\t\t<div 
class=\"gallerytext\">\t\t\t</div>\n\t\t</div>\n\t\t* <div style=\"width: 
155px\">\n\t\t\t<div class=\"thumb\" style=\"width: 150px;\"><div 
style=\"margin:68px 
auto;\">http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg</div></div>\n\t\t\t<div
 class=\"gallerytext\">\t\t\t</div>\n\t\t</div>\n\t\t* <div style=\"width: 
155px\">\n\t\t\t<div class=\"thumb\" style=\"width: 150px;\"><div 
style=\"margin:68px 
auto;\">http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg</div></div>\n\t\t\t<div
 class=\"gallerytext\">\t\t\t</div>\n\t\t</div>\n");
+add("html2wt", "gallery (with showfilename option)", "\t\t* <div 
style=\"width: 155px\">\n\t\t\t<div class=\"thumb\" style=\"height: 
150px;\">Nonexistent.jpg</div>\n\t\t\t<div 
class=\"gallerytext\">\n[[wiki/File:Nonexistent.jpg|Nonexistent.jpg]]\ncaption\n\n\t\t\t</div>\n\t\t</div>\n\t\t*
 <div style=\"width: 155px\">\n\t\t\t<div class=\"thumb\" style=\"height: 
150px;\">Nonexistent.jpg</div>\n\t\t\t<div 
class=\"gallerytext\">\n[[wiki/File:Nonexistent.jpg|Nonexistent.jpg]]\n\n\t\t\t</div>\n\t\t</div>\n\t\t*
 <div style=\"width: 155px\">\n\t\t\t<div class=\"thumb\" style=\"width: 
150px;\"><div style=\"margin:68px 
auto;\">http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg</div></div>\n\t\t\t<div
 class=\"gallerytext\">\n[[wiki/File:Foobar.jpg|Foobar.jpg]]\nsome 
'''caption''' [[wiki/Main Page|Main Page]]\n\n\t\t\t</div>\n\t\t</div>\n\t\t* 
<div style=\"width: 155px\">\n\t\t\t<div class=\"thumb\" style=\"width: 
150px;\"><div style=\"margin:68px 
auto;\">http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg</div></div>\n\t\t\t<div
 
class=\"gallerytext\">\n[[wiki/File:Foobar.jpg|Foobar.jpg]]\n\n\t\t\t</div>\n\t\t</div>\n");
+add("html2wt", "Gallery (with namespace-less filenames)", "\t\t* <div 
style=\"width: 155px\">\n\t\t\t<div class=\"thumb\" style=\"height: 
150px;\">Nonexistent.jpg</div>\n\t\t\t<div 
class=\"gallerytext\">\t\t\t</div>\n\t\t</div>\n\t\t* <div style=\"width: 
155px\">\n\t\t\t<div class=\"thumb\" style=\"height: 
150px;\">Nonexistent.jpg</div>\n\t\t\t<div 
class=\"gallerytext\">\t\t\t</div>\n\t\t</div>\n\t\t* <div style=\"width: 
155px\">\n\t\t\t<div class=\"thumb\" style=\"width: 150px;\"><div 
style=\"margin:68px 
auto;\">http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg</div></div>\n\t\t\t<div
 class=\"gallerytext\">\t\t\t</div>\n\t\t</div>\n\t\t* <div style=\"width: 
155px\">\n\t\t\t<div class=\"thumb\" style=\"width: 150px;\"><div 
style=\"margin:68px 
auto;\">http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg</div></div>\n\t\t\t<div
 class=\"gallerytext\">\t\t\t</div>\n\t\t</div>\n");
 add("html2wt", "__FORCETOC__ override", "\n");
 add("html2wt", "ISBN code coverage", 
"[[wiki/Special:BookSources/9780123456|ISBN 978-0-1234-56]] 789\n");
 add("html2wt", "Double ISBN", "ISBN [[wiki/Special:BookSources/1234567890|ISBN 
1234567890]]\n");
@@ -1971,6 +1986,7 @@
 add("selser", "Definition Lists: Weird Ones: Test 1 [[[[[[2]]]]]]", "*#: 
m79ersaiyeqaor\n;*::;; foo : bar (who uses this?)");
 add("selser", "Definition Lists: Weird Ones: Test 1 [[[[[[[2]]]]]]]", 
"*#;q93hogh7bi2ro1or\n*::;; foo : bar (who uses this?)");
 add("selser", "Definition Lists: Weird Ones: Test 1 [[[[2]]]]", "*# 
mug1j4xbiskprpb9\n#;*::;; foo : bar (who uses this?)");
+add("selser", "External links: No preceding word characters allowed (bug 
65278) [2]", 
"mig7hyd77nfjemi\n\nNOPEhttp://example.com\nN0http://example.com\nok:http://example.com\nok-http://example.com";);
 add("selser", "BUG 289: \">\"-token in bracketed URL [2]", 
"ll0lxyd1rfgpsyvi\n\n[http://www.example.com/<hello> stuff]");
 add("selser", "BUG 289: \">\"-token in bracketed URL [1]", 
"[http://www.example.com/<hello> stuff]");
 add("selser", "BUG 289: \">\"-token in bracketed URL [[2]]", 
"kemi29jie4b1emi[http://www.example.com/<hello> stuff]");
@@ -2107,6 +2123,13 @@
 add("selser", "Build table with {{!}} [[4,2]]", "{{{!}} 
class=\"wikitable\"<!--wa7mbefsy7nfjemi--><!--8sf0msj7spmbo6r-->\n! header\n! 
second header\n{{!}}- style=\"color:red;\"\n{{!}} data {{!}}{{!}} 
style=\"color:red;\" {{!}} second data\n{{!}{{!}}}");
 add("selser", "Build table with {{!}} [[2,2]]", "{{{!}} 
class=\"wikitable\"<!--hbgluiuyj95asjor-->\n<!--xss2k4vz6txd2t9-->! header\n! 
second header\n{{!}}- style=\"color:red;\"\n{{!}} data {{!}}{{!}} 
style=\"color:red;\" {{!}} second data\n{{!}{{!}}}");
 add("selser", "Build table with {{!}} [[4,1]]", "{{{!}} 
class=\"wikitable\"<!--q4x91ifb5ku766r-->\n! header\n! second header\n{{!}}- 
style=\"color:red;\"\n{{!}} data {{!}}{{!}} style=\"color:red;\" {{!}} second 
data\n{{!\n{{!}}}");
+add("selser", "Build table with pipe as data [[4,2]]", "{| 
class=\"wikitable\"<!--edau2tsedygb9--><!--v3k9certcyx03sor-->\n! header\n! 
second header\n|- style=\"color:red;\"\n| data || style=\"color:red;\" | second 
data\n|-\n| style=\"color:red;\" | data with | || style=\"color:red;\" | second 
data with |\n|-\n|| data with | ||| second data with |\n|}");
+add("selser", "Build table with pipe as data [[3,2]]", "{| 
class=\"wikitable\"<!--0g4x735w6hcl3di-->\n! header\n! second header\n|- 
style=\"color:red;\"\n| data || style=\"color:red;\" | second data\n|-\n| 
style=\"color:red;\" | data with | || style=\"color:red;\" | second data with 
|\n|-\n|| data with | ||| second data with |\n|}");
+add("selser", "Build table with pipe as data [2]", "lmhnucjqwqctmx6r\n{| 
class=\"wikitable\"\n! header\n! second header\n|- style=\"color:red;\"\n| data 
|| style=\"color:red;\" | second data\n|-\n| style=\"color:red;\" | data with | 
|| style=\"color:red;\" | second data with |\n|-\n|| data with | ||| second 
data with |\n|}");
+add("selser", "Build table with pipe as data [1]", "{| class=\"wikitable\" 
data-foobar=\"lalglq06kuf03sor\"\n! header\n! second header\n|- 
style=\"color:red;\"\n| data || style=\"color:red;\" | second data\n|-\n| 
style=\"color:red;\" | data with | || style=\"color:red;\" | second data with 
|\n|-\n|| data with | ||| second data with |\n|}");
+add("selser", "Build table with pipe as data [[0,1]]", "{| 
class=\"wikitable\"\n! header\n! second header\n|- style=\"color:red;\"\n| data 
|| style=\"color:red;\" | second data\n|-\n| style=\"color:red;\" | data with | 
|| style=\"color:red;\" | second data with |\n|-\n|| data with | ||| second 
data with |\n|}");
+add("selser", "Build table with pipe as data 
[[0,[[3,0,4],0,[3,2,4],0,0,3,[3,3,4],0]]]", "{| 
class=\"wikitable\"\n\n|89vo0bmcsbkv5cdi\n|- 
style=\"color:red;\"\n|zwnhagffqiqhyqfr\n| data \n|dju7n7jhc15rk9\n|-\n| 
style=\"color:red;\" | data with | || style=\"color:red;\" | second data with 
|\n|-\n|lljma7s674vrhpvi\n|}");
+add("selser", "Build table with pipe as data [[2,2]]", "{| 
class=\"wikitable\"<!--hw4dq390xgk3xr-->\n<!--uqj5x3w6iwndbo6r-->! header\n! 
second header\n|- style=\"color:red;\"\n| data || style=\"color:red;\" | second 
data\n|-\n| style=\"color:red;\" | data with | || style=\"color:red;\" | second 
data with |\n|-\n|| data with | ||| second data with |\n|}");
 add("selser", "Piped link with multiple pipe characters in link text [1]", 
"[[Main Page||The|Main|Page|]]");
 add("selser", "Piped link with multiple pipe characters in link text [2]", 
"i30rvug3leeqxgvi\n\n[[Main Page||The|Main|Page|]]");
 add("selser", "Piped link with multiple pipe characters in link text [[2]]", 
"1of1ixy9fexqd7vi[[Main Page||The|Main|Page|]]");
diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index bd0b34e..f7dc0a9 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -4181,6 +4181,13 @@
 http://example.com?
 http://example.com)
 http://example.com/url_with_(brackets)
+(http://example.com/url_without_brackets)
+http://example.com/url_with_entity&nbsp;
+http://example.com/url_with_entity&#xA0;
+http://example.com/url_with_entity&#160;
+http://example.com/url_with_entity&lt;
+http://example.com/url_with_entity&#x3C;
+http://example.com/url_with_entity&#60;
 !! html
 <p><a rel="nofollow" class="external free" 
href="http://example.com";>http://example.com</a>,
 <a rel="nofollow" class="external free" 
href="http://example.com";>http://example.com</a>;
@@ -4191,6 +4198,28 @@
 <a rel="nofollow" class="external free" 
href="http://example.com";>http://example.com</a>?
 <a rel="nofollow" class="external free" 
href="http://example.com";>http://example.com</a>)
 <a rel="nofollow" class="external free" 
href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
+(<a rel="nofollow" class="external free" 
href="http://example.com/url_without_brackets";>http://example.com/url_without_brackets</a>)
+<a rel="nofollow" class="external free" 
href="http://example.com/url_with_entity ";>http://example.com/url_with_entity 
</a>
+<a rel="nofollow" class="external free" 
href="http://example.com/url_with_entity ";>http://example.com/url_with_entity 
</a>
+<a rel="nofollow" class="external free" 
href="http://example.com/url_with_entity ";>http://example.com/url_with_entity 
</a>
+<a rel="nofollow" class="external free" 
href="http://example.com/url_with_entity";>http://example.com/url_with_entity</a>&lt;
+<a rel="nofollow" class="external free" 
href="http://example.com/url_with_entity%3C";>http://example.com/url_with_entity%3C</a>
+<a rel="nofollow" class="external free" 
href="http://example.com/url_with_entity%3C";>http://example.com/url_with_entity%3C</a>
+</p>
+!! end
+
+!! test
+External links: No preceding word characters allowed (bug 65278)
+!! wikitext
+NOPEhttp://example.com
+N0http://example.com
+ok:http://example.com
+ok-http://example.com
+!! html
+<p>NOPEhttp://example.com
+N0http://example.com
+ok:<a rel="nofollow" class="external free" 
href="http://example.com";>http://example.com</a>
+ok-<a rel="nofollow" class="external free" 
href="http://example.com";>http://example.com</a>
 </p>
 !! end
 
@@ -5725,6 +5754,68 @@
 <tr style="color:red;">
 <td> data </td>
 <td style="color:red;"> second data
+</td></tr></table>
+
+!! end
+
+!! test
+Build table with pipe as data
+!! wikitext
+{| class="wikitable"
+! header
+! second header
+|- style="color:red;"
+| data || style="color:red;" | second data
+|-
+| style="color:red;" | data with | || style="color:red;" | second data with |
+|-
+|| data with | ||| second data with |
+|}
+!! html
+<table class="wikitable">
+<tr>
+<th> header
+</th>
+<th> second header
+</th></tr>
+<tr style="color:red;">
+<td> data </td>
+<td style="color:red;"> second data
+</td></tr>
+<tr>
+<td style="color:red;"> data with | </td>
+<td style="color:red;"> second data with |
+</td></tr>
+<tr>
+<td> data with | </td>
+<td> second data with |
+</td></tr></table>
+
+!! end
+
+!! test
+Build table with wikilink
+!! wikitext
+{| class="wikitable"
+! header || second header
+|- style="color:red;"
+| data [[Main Page|linktext]] || second data [[Main Page|linktext]]
+|-
+| data || second data [[Main Page|link|text with pipe]]
+|}
+!! html
+<table class="wikitable">
+<tr>
+<th> header </th>
+<th> second header
+</th></tr>
+<tr style="color:red;">
+<td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
+<td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
+</td></tr>
+<tr>
+<td> data </td>
+<td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with 
pipe</a>
 </td></tr></table>
 
 !! end
@@ -8835,6 +8926,15 @@
 !! end
 
 !! test
+Magic links: RFC (bug 65278)
+!! wikitext
+This is RFC 822 but thisRFC 822 is not RFC 822linked.
+!! html
+<p>This is <a class="external mw-magiclink-rfc" rel="nofollow" 
href="//tools.ietf.org/html/rfc822">RFC 822</a> but thisRFC 822 is not RFC 
822linked.
+</p>
+!! end
+
+!! test
 Magic links: ISBN (bug 1937)
 !! wikitext
 ISBN 0-306-40615-2
@@ -8844,11 +8944,29 @@
 !! end
 
 !! test
+Magic links: ISBN (bug 65278)
+!! wikitext
+This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 
978-0-316-09811-3linked.
+!! html
+<p>This is <a href="/wiki/Special:BookSources/9780316098113" class="internal 
mw-magiclink-isbn">ISBN 978-0-316-09811-3</a> but thisISBN 978-0-316-09811-3 is 
not ISBN 978-0-316-09811-3linked.
+</p>
+!! end
+
+!! test
 Magic links: PMID incorrectly converts space to underscore
 !! wikitext
 PMID 1234
 !! html
 <p><a class="external mw-magiclink-pmid" rel="nofollow" 
href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
+</p>
+!! end
+
+!! test
+Magic links: PMID (bug 65278)
+!! wikitext
+This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
+!! html
+<p>This is <a class="external mw-magiclink-pmid" rel="nofollow" 
href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a> but 
thisPMID 1234 is not PMID 1234linked.
 </p>
 !! end
 
@@ -11208,6 +11326,15 @@
 [[]]
 <a rel="mw:WikiLink" href="./Link2" title="Link2" 
data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
 </figcaption></figure>
+!! end
+
+!! test
+Titles in unlinked images (T23454)
+!! wikitext
+[[File:Foobar.jpg|link=|stuff]]
+!! html/php
+<p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg"; 
title="stuff" width="1941" height="220" />
+</p>
 !! end
 
 !! test
@@ -16380,8 +16507,8 @@
 Gallery (with options)
 !! wikitext
 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
-File:Nonexistant.jpg|caption
-File:Nonexistant.jpg
+File:Nonexistent.jpg|caption
+File:Nonexistent.jpg
 image:foobar.jpg|some '''caption''' [[Main Page]]
 image:foobar.jpg
 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
@@ -16390,14 +16517,14 @@
 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 
226px;">
        <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main 
Page">Main Page</a></li>
                <li class="gallerybox" style="width: 105px"><div style="width: 
105px">
-                       <div class="thumb" style="height: 
70px;">Nonexistant.jpg</div>
+                       <div class="thumb" style="height: 
70px;">Nonexistent.jpg</div>
                        <div class="gallerytext">
 <p>caption
 </p>
                        </div>
                </div></li>
                <li class="gallerybox" style="width: 105px"><div style="width: 
105px">
-                       <div class="thumb" style="height: 
70px;">Nonexistant.jpg</div>
+                       <div class="thumb" style="height: 
70px;">Nonexistent.jpg</div>
                        <div class="gallerytext">
                        </div>
                </div></li>
@@ -16486,25 +16613,25 @@
 gallery (with showfilename option)
 !! wikitext
 <gallery showfilename>
-File:Nonexistant.jpg|caption
-File:Nonexistant.jpg
+File:Nonexistent.jpg|caption
+File:Nonexistent.jpg
 image:foobar.jpg|some '''caption''' [[Main Page]]
 File:Foobar.jpg
 </gallery>
 !! html
 <ul class="gallery mw-gallery-traditional">
                <li class="gallerybox" style="width: 155px"><div style="width: 
155px">
-                       <div class="thumb" style="height: 
150px;">Nonexistant.jpg</div>
+                       <div class="thumb" style="height: 
150px;">Nonexistent.jpg</div>
                        <div class="gallerytext">
-<p><a href="/wiki/File:Nonexistant.jpg" 
title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
+<p><a href="/wiki/File:Nonexistent.jpg" 
title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
 caption
 </p>
                        </div>
                </div></li>
                <li class="gallerybox" style="width: 155px"><div style="width: 
155px">
-                       <div class="thumb" style="height: 
150px;">Nonexistant.jpg</div>
+                       <div class="thumb" style="height: 
150px;">Nonexistent.jpg</div>
                        <div class="gallerytext">
-<p><a href="/wiki/File:Nonexistant.jpg" 
title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
+<p><a href="/wiki/File:Nonexistent.jpg" 
title="File:Nonexistent.jpg">Nonexistent.jpg</a><br />
 </p>
                        </div>
                </div></li>
@@ -16531,20 +16658,20 @@
 Gallery (with namespace-less filenames)
 !! wikitext
 <gallery>
-File:Nonexistant.jpg
-Nonexistant.jpg
+File:Nonexistent.jpg
+Nonexistent.jpg
 image:foobar.jpg
 foobar.jpg
 </gallery>
 !! html
 <ul class="gallery mw-gallery-traditional">
                <li class="gallerybox" style="width: 155px"><div style="width: 
155px">
-                       <div class="thumb" style="height: 
150px;">Nonexistant.jpg</div>
+                       <div class="thumb" style="height: 
150px;">Nonexistent.jpg</div>
                        <div class="gallerytext">
                        </div>
                </div></li>
                <li class="gallerybox" style="width: 155px"><div style="width: 
155px">
-                       <div class="thumb" style="height: 
150px;">Nonexistant.jpg</div>
+                       <div class="thumb" style="height: 
150px;">Nonexistent.jpg</div>
                        <div class="gallerytext">
                        </div>
                </div></li>

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie5d52929980da98bdea3a8042f67352470285de9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Cscott <[email protected]>
Gerrit-Reviewer: Arlolra <[email protected]>
Gerrit-Reviewer: Marcoil <[email protected]>
Gerrit-Reviewer: Subramanya Sastry <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to