C. Scott Ananian has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/396066 )

Change subject: Rename rel="WikiLink/InterWiki" to rel="WikiLink/Interwiki"
......................................................................

Rename rel="WikiLink/InterWiki" to rel="WikiLink/Interwiki"

https://en.wikipedia.org/wiki/Help:Link suggests that the recommended
phrases are "wikilink", "interwiki link" and "external link".
That suggests that there should not be internal capitalization in
"InterWiki".

You could also argue that we should use "Wikilink" instead of
"WikiLink"... but we'll hand wave around that because "wiki link"
is still an accepted spelling.

Change-Id: I757832290a1ce4c56d5a5cd9d8d702ae7dbdda91
---
M lib/html2wt/ConstrainedText.js
M lib/wt2html/pp/handlers/handleLinkNeighbours.js
M lib/wt2html/tt/LinkHandler.js
M lib/wt2html/tt/Sanitizer.js
M tests/parserTests-blacklist.js
M tests/parserTests.txt
6 files changed, 43 insertions(+), 43 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/66/396066/1

diff --git a/lib/html2wt/ConstrainedText.js b/lib/html2wt/ConstrainedText.js
index a259298..afd2c58 100644
--- a/lib/html2wt/ConstrainedText.js
+++ b/lib/html2wt/ConstrainedText.js
@@ -328,7 +328,7 @@
  */
 var WikiLinkText = function WikiLinkText(text, node, wikiConfig, type) {
        // category links/external links/images don't use link trails or 
prefixes
-       var noTrails = !/^mw:WikiLink(\/InterWiki)?$/.test(type);
+       var noTrails = !/^mw:WikiLink(\/Interwiki)?$/.test(type);
        var badPrefix = /(^|[^\[])(\[\[)*\[$/;
        if (!noTrails && wikiConfig.linkPrefixRegex) {
                badPrefix = JSUtils.rejoin('(', wikiConfig.linkPrefixRegex, 
')|(', badPrefix, ')');
@@ -360,9 +360,9 @@
        var stx = dataParsoid.stx || '';
        // TODO: Leaving this for backwards compatibility, remove when 1.5 is 
no longer bound
        if (type === 'mw:ExtLink') {
-               type = 'mw:WikiLink/InterWiki';
+               type = 'mw:WikiLink/Interwiki';
        }
-       if (/^mw:WikiLink(\/InterWiki)?$/.test(type) && 
/^(simple|piped)$/.test(stx)) {
+       if (/^mw:WikiLink(\/Interwiki)?$/.test(type) && 
/^(simple|piped)$/.test(stx)) {
                return new WikiLinkText(text, node, env.conf.wiki, type);
        }
 };
diff --git a/lib/wt2html/pp/handlers/handleLinkNeighbours.js 
b/lib/wt2html/pp/handlers/handleLinkNeighbours.js
index d4e88f3..a0c9ebc 100644
--- a/lib/wt2html/pp/handlers/handleLinkNeighbours.js
+++ b/lib/wt2html/pp/handlers/handleLinkNeighbours.js
@@ -118,7 +118,7 @@
  */
 function handleLinkNeighbours(node, env) {
        var rel = node.getAttribute('rel');
-       if (!/^mw:WikiLink(\/InterWiki)?$/.test(rel)) {
+       if (!/^mw:WikiLink(\/Interwiki)?$/.test(rel)) {
                return true;
        }
 
diff --git a/lib/wt2html/tt/LinkHandler.js b/lib/wt2html/tt/LinkHandler.js
index f1de3a2..bd28c9d 100644
--- a/lib/wt2html/tt/LinkHandler.js
+++ b/lib/wt2html/tt/LinkHandler.js
@@ -631,7 +631,7 @@
        newTk.addNormalizedAttribute('href', Util.sanitizeURI(absHref), 
target.hrefSrc);
 
        // Change the rel to be mw:ExtLink
-       Util.lookupKV(newTk.attribs, 'rel').v = 'mw:WikiLink/InterWiki';
+       Util.lookupKV(newTk.attribs, 'rel').v = 'mw:WikiLink/Interwiki';
        // Remember that this was using wikitext syntax though
        newTk.dataAttribs.isIW = true;
        // Add title unless it's just a fragment (and trim off fragment)
diff --git a/lib/wt2html/tt/Sanitizer.js b/lib/wt2html/tt/Sanitizer.js
index 8469b93..18d10b7 100644
--- a/lib/wt2html/tt/Sanitizer.js
+++ b/lib/wt2html/tt/Sanitizer.js
@@ -1081,7 +1081,7 @@
                        // LinkHandler, we may have already shadowed this value 
so use
                        // that instead.
                        var rel = token.getAttributeShadowInfo('rel');
-                       var mode = (k === 'href' && rel && 
(/^mw:WikiLink(\/InterWiki)?$/.test(rel.value))) ?
+                       var mode = (k === 'href' && rel && 
(/^mw:WikiLink(\/Interwiki)?$/.test(rel.value))) ?
                                'wikilink' : 'external';
                        var origHref = token.getAttributeShadowInfo(k).value;
                        var newHref = Sanitizer.cleanUrl(this.env, v, mode);
diff --git a/tests/parserTests-blacklist.js b/tests/parserTests-blacklist.js
index 751e385..dae87d1 100644
--- a/tests/parserTests-blacklist.js
+++ b/tests/parserTests-blacklist.js
@@ -59,7 +59,7 @@
 add("wt2html", "Self-link to numeric title", "<p 
data-parsoid='{\"dsr\":[0,5,0,0]}'><a rel=\"mw:WikiLink\" href=\"./0\" 
title=\"0\" 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./0\"},\"sa\":{\"href\":\"0\"},\"dsr\":[0,5,2,2]}'>0</a></p>");
 add("wt2html", "<nowiki> inside a link", "<p 
data-parsoid='{\"dsr\":[0,96,0,0]}'><a rel=\"mw:WikiLink\" href=\"./Main_Page\" 
title=\"Main Page\" 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Main_Page\"},\"sa\":{\"href\":\"Main&lt;nowiki>
 Page&lt;/nowiki>\"},\"dsr\":[0,30,2,2]}'>Main Page</a> <a rel=\"mw:WikiLink\" 
href=\"./Main_Page\" title=\"Main Page\" 
data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Main_Page\"},\"sa\":{\"href\":\"Main
 Page\"},\"dsr\":[31,96,12,2]}'>the main page <span typeof=\"mw:Nowiki\" 
data-parsoid='{\"dsr\":[57,94,8,9]}'>[it's not very good]</span></a></p>");
 add("wt2html", "Interlanguage link with spacing", "<p 
data-parsoid='{\"dsr\":[0,14,0,0]}'>Blah blah blah</p>\n<link 
rel=\"mw:PageProp/Language\" 
href=\"http://zh.wikipedia.org/wiki/%20%20%20%20Chinese%20%20%20%20%20\"; 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"http://zh.wikipedia.org/wiki/%20%20%20%20Chinese%20%20%20%20%20\"},\"sa\":{\"href\":\";
   zh  :    Chinese     \"},\"dsr\":[15,43,null,null]}'/>");
-add("wt2html", "Escaping of interlanguage links (T129218, T156308)", "<p 
data-parsoid='{\"dsr\":[0,51,0,0]}'>Blah blah blah\n<a 
rel=\"mw:WikiLink/InterWiki\" href=\"http://es.wikipedia.org/wiki/Spanish\"; 
title=\"es:Spanish\" 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"http://es.wikipedia.org/wiki/Spanish\"},\"sa\":{\"href\":\":es:Spanish\"},\"isIW\":true,\"dsr\":[15,30,2,2]}'>es:Spanish</a>\n<a
 rel=\"mw:WikiLink\" href=\"./Zh_:_Chinese\" title=\"Zh : Chinese\" 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Zh_:_Chinese\"},\"sa\":{\"href\":\"
 : zh : Chinese \"},\"dsr\":[31,51,2,2]}'> : zh : Chinese </a></p>");
+add("wt2html", "Escaping of interlanguage links (T129218, T156308)", "<p 
data-parsoid='{\"dsr\":[0,51,0,0]}'>Blah blah blah\n<a 
rel=\"mw:WikiLink/Interwiki\" href=\"http://es.wikipedia.org/wiki/Spanish\"; 
title=\"es:Spanish\" 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"http://es.wikipedia.org/wiki/Spanish\"},\"sa\":{\"href\":\":es:Spanish\"},\"isIW\":true,\"dsr\":[15,30,2,2]}'>es:Spanish</a>\n<a
 rel=\"mw:WikiLink\" href=\"./Zh_:_Chinese\" title=\"Zh : Chinese\" 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Zh_:_Chinese\"},\"sa\":{\"href\":\"
 : zh : Chinese \"},\"dsr\":[31,51,2,2]}'> : zh : Chinese </a></p>");
 add("wt2html", "Space and question mark encoding in interlanguage links 
(T95473)", "<p data-parsoid='{\"dsr\":[0,14,0,0]}'>Blah blah blah</p>\n<link 
rel=\"mw:PageProp/Language\" href=\"http://es.wikipedia.org/wiki/Foo%20bar?\"; 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"http://es.wikipedia.org/wiki/Foo%20bar?\"},\"sa\":{\"href\":\"es:Foo
 bar?\"},\"dsr\":[15,30,null,null]}'/>");
 add("wt2html", "2. Lists with start-of-line-transparent tokens before bullets: 
Template close", "<ul about=\"#mwt1\" typeof=\"mw:Transclusion\" 
data-parsoid='{\"dsr\":[0,18,0,0],\"firstWikitextNode\":\"UL\",\"pi\":[[{\"k\":\"1\"}]]}'
 data-mw='{\"parts\":[\"*foo 
\",{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"bar\\n\"}},\"i\":0}}]}'><li>foo
 bar</li></ul><span about=\"#mwt1\">\n</span><p 
data-parsoid='{\"dsr\":[18,22,0,0]}'>*baz</p>");
 add("wt2html", "Multiple list tags generated by templates", "<li 
about=\"#mwt1\" typeof=\"mw:Transclusion\" 
data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[0,44,null,null],\"pi\":[[{\"k\":\"1\"}],[{\"k\":\"1\"}],[{\"k\":\"1\"}]]}'
 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&lt;li>\"}},\"i\":0}},\"a\\n\",{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&lt;li>\"}},\"i\":1}},\"b\\n\",{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&lt;li>\"}},\"i\":2}},\"c\"]}'>a\n</li><li
 about=\"#mwt1\">b\n</li><li about=\"#mwt1\" 
data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[null,44,null,0]}'>c</li>");
@@ -151,7 +151,7 @@
 add("wt2html", "CSS line continuation 2", "<div style=\"/* insecure input */\" 
data-parsoid='{\"stx\":\"html\",\"a\":{\"style\":\"/* insecure input 
*/\"},\"sa\":{\"style\":\"background-image: u\\\\&amp;#13;rl(test.jpg); 
\"},\"dsr\":[0,59,53,6]}'></div>");
 add("wt2html", "Sanitizer: Closing of closed but not open table tags", "Table 
not started");
 add("wt2html", "Sanitizer: Validating that <meta> and <link> work, but only 
for Microdata", "<div itemscope=\"\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[0,308,15,6]}'>\n\t<p 
data-parsoid='{\"dsr\":[17,301,0,0]}'>&lt;meta itemprop=\"hello\" 
content=\"world\">\n\t&lt;meta http-equiv=\"refresh\" 
content=\"5\">\n\t&lt;meta itemprop=\"hello\" http-equiv=\"refresh\" 
content=\"5\">\n\t&lt;link itemprop=\"hello\" href=\"{{SERVER}}\">\n\t&lt;link 
rel=\"stylesheet\" href=\"{{SERVER}}\">\n\t&lt;link rel=\"stylesheet\" 
itemprop=\"hello\" href=\"{{SERVER}}\"></p>\n</div>");
-add("wt2html", "Sanitizer: angle brackets are invalid, even in interwiki links 
(T182338)", "<p data-parsoid='{\"dsr\":[0,89,0,0]}'><a 
rel=\"mw:WikiLink/InterWiki\" 
href=\"http://www.usemod.com/cgi-bin/mb.pl?Foo&lt;Bar\"; 
title=\"meatball:Foo&lt;Bar\" 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"http://www.usemod.com/cgi-bin/mb.pl?Foo&lt;Bar\"},\"sa\":{\"href\":\"meatball:Foo&lt;Bar\"},\"isIW\":true,\"dsr\":[0,20,2,2]}'>meatball:Foo&lt;Bar</a>\n<a
 rel=\"mw:WikiLink/InterWiki\" 
href=\"http://www.usemod.com/cgi-bin/mb.pl?Foo>Bar\" title=\"meatball:Foo>Bar\" 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"http://www.usemod.com/cgi-bin/mb.pl?Foo>Bar\"},\"sa\":{\"href\":\"meatball:Foo>Bar\"},\"isIW\":true,\"dsr\":[21,41,2,2]}'>meatball:Foo>Bar</a>\n<a
 rel=\"mw:WikiLink/InterWiki\" 
href=\"http://www.usemod.com/cgi-bin/mb.pl?Foo&lt;bar\"; 
title=\"meatball:Foo&lt;bar\" 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"http://www.usemod.com/cgi-bin/mb.pl?Foo&lt;bar\"},\"sa\":{\"href\":\"meatball:Foo&amp;lt;bar\"},\"isIW\":true,\"dsr\":[42,65,2,2]}'>meatball:Foo&lt;bar</a>\n<a
 rel=\"mw:WikiLink/InterWiki\" 
href=\"http://www.usemod.com/cgi-bin/mb.pl?Foo>bar\" title=\"meatball:Foo>bar\" 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"http://www.usemod.com/cgi-bin/mb.pl?Foo>bar\"},\"sa\":{\"href\":\"meatball:Foo&amp;gt;bar\"},\"isIW\":true,\"dsr\":[66,89,2,2]}'>meatball:Foo>bar</a></p>");
+add("wt2html", "Sanitizer: angle brackets are invalid, even in interwiki links 
(T182338)", "<p data-parsoid='{\"dsr\":[0,89,0,0]}'><a 
rel=\"mw:WikiLink/Interwiki\" 
href=\"http://www.usemod.com/cgi-bin/mb.pl?Foo&lt;Bar\"; 
title=\"meatball:Foo&lt;Bar\" 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"http://www.usemod.com/cgi-bin/mb.pl?Foo&lt;Bar\"},\"sa\":{\"href\":\"meatball:Foo&lt;Bar\"},\"isIW\":true,\"dsr\":[0,20,2,2]}'>meatball:Foo&lt;Bar</a>\n<a
 rel=\"mw:WikiLink/Interwiki\" 
href=\"http://www.usemod.com/cgi-bin/mb.pl?Foo>Bar\" title=\"meatball:Foo>Bar\" 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"http://www.usemod.com/cgi-bin/mb.pl?Foo>Bar\"},\"sa\":{\"href\":\"meatball:Foo>Bar\"},\"isIW\":true,\"dsr\":[21,41,2,2]}'>meatball:Foo>Bar</a>\n<a
 rel=\"mw:WikiLink/Interwiki\" 
href=\"http://www.usemod.com/cgi-bin/mb.pl?Foo&lt;bar\"; 
title=\"meatball:Foo&lt;bar\" 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"http://www.usemod.com/cgi-bin/mb.pl?Foo&lt;bar\"},\"sa\":{\"href\":\"meatball:Foo&amp;lt;bar\"},\"isIW\":true,\"dsr\":[42,65,2,2]}'>meatball:Foo&lt;bar</a>\n<a
 rel=\"mw:WikiLink/Interwiki\" 
href=\"http://www.usemod.com/cgi-bin/mb.pl?Foo>bar\" title=\"meatball:Foo>bar\" 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"http://www.usemod.com/cgi-bin/mb.pl?Foo>bar\"},\"sa\":{\"href\":\"meatball:Foo&amp;gt;bar\"},\"isIW\":true,\"dsr\":[66,89,2,2]}'>meatball:Foo>bar</a></p>");
 add("wt2html", "Language converter glossary rules inside attributes 
(T119158)", "<p data-parsoid='{\"dsr\":[0,52,0,0]}'><meta 
typeof=\"mw:LanguageVariant\" 
data-mw-variant='{\"add\":true,\"oneway\":[{\"f\":\"foAjrjvi\",\"l\":\"sr-el\",\"t\":\"\\\"
 onload=\\\"alert(1)\\\" data-foo=\\\"\"}]}' 
data-parsoid='{\"fl\":[\"H\"],\"src\":\"-{H|foAjrjvi=>sr-el:\\\" 
onload=\\\"alert(1)\\\" 
data-foo=\\\"}-\",\"tSp\":[4],\"dsr\":[0,52,null,null]}'/></p>\n\n<p 
data-parsoid='{\"dsr\":[54,94,0,0]}'><figure-inline class=\"mw-default-size\" 
typeof=\"mw:Image\" 
data-parsoid='{\"optList\":[{\"ck\":\"alt\",\"ak\":\"alt=-{}-foAjrjvi-{}-\"}],\"dsr\":[54,94,null,null]}'><a
 href=\"./Датотека:Foobar.jpg\" 
data-parsoid='{\"a\":{\"href\":\"./Датотека:Foobar.jpg\"},\"sa\":{\"href\":\"File:Foobar.jpg\"}}'><img
 alt=\"foAjrjvi\" resource=\"./Датотека:Foobar.jpg\" 
src=\"//example.com/images/3/3a/Foobar.jpg\" data-file-width=\"1941\" 
data-file-height=\"220\" data-file-type=\"bitmap\" height=\"220\" 
width=\"1941\" 
data-parsoid='{\"a\":{\"alt\":\"foAjrjvi\",\"resource\":\"./Датотека:Foobar.jpg\",\"height\":\"220\",\"width\":\"1941\"},\"sa\":{\"alt\":\"alt=-{}-foAjrjvi-{}-\",\"resource\":\"File:Foobar.jpg\"}}'/></a></figure-inline></p>");
 add("wt2html", "Inline HTML vs wiki block nesting", "<p 
data-parsoid='{\"dsr\":[0,17,0,0]}'><b 
data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"dsr\":[0,17,3,0]}'>Bold
 paragraph</b></p><b 
data-parsoid='{\"stx\":\"html\",\"autoInsertedEnd\":true,\"autoInsertedStart\":true,\"dsr\":[17,37,0,0]}'>\n\n<p
 data-parsoid='{\"dsr\":[19,37,0,0]}'>New wiki paragraph</p></b>");
 add("wt2html", "Special page transclusion", "<p 
data-parsoid='{\"dsr\":[0,30,0,0]}'><span about=\"#mwt2\" typeof=\"mw:Error 
mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[0,30,null,null]}' 
data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"Special:Prefixindex/Xyzzyx\",\"href\":\"./Special:PrefixIndex/Xyzzyx\"},\"params\":{},\"errors\":[{\"key\":\"mw-api-tplfetch-error\",\"message\":\"Page
 / template fetching disabled, and no cache for 
Special:PrefixIndex/Xyzzyx\"}],\"i\":0}}]}'>{{Special:Prefixindex/Xyzzyx}}</span></p>");
@@ -418,7 +418,7 @@
 add("html2html", "CSS line continuation 2", "<div style=\" \" 
data-parsoid='{\"stx\":\"html\",\"a\":{\"style\":\" \"},\"sa\":{\"style\":\"/* 
invalid control char */\"},\"dsr\":[0,46,40,6]}'></div>\n");
 add("html2html", "Parser hook: nested tags", "<pre typeof=\"mw:Extension/tag\" 
about=\"#mwt3\" data-parsoid='{\"dsr\":[0,16,2,2]}' 
data-mw='{\"name\":\"tag\",\"attrs\":{},\"body\":{\"extsrc\":\"&lt;tag>\"}}'></pre><span
 typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[16,39,8,9]}'>&lt;/tag></span>");
 add("html2html", "Sanitizer: Validating that <meta> and <link> work, but only 
for Microdata", "<div itemscope=\"\" 
data-parsoid='{\"stx\":\"html\",\"dsr\":[0,244,18,6]}'>\n\t<p 
data-parsoid='{\"dsr\":[20,236,0,0]}'>&lt;meta itemprop=\"hello\" 
content=\"world\" />\n\t&lt;meta http-equiv=\"refresh\" 
content=\"5\">\n\t&lt;meta itemprop=\"hello\" content=\"5\" />\n\t<a 
rel=\"mw:ExtLink\" href=\"http://example.org\"; 
data-parsoid='{\"targetOff\":162,\"contentOffsets\":[162,162],\"dsr\":[143,163,19,1]}'></a>\n\t&lt;link
 rel=\"stylesheet\" href=\"http://example.org\";>\n\t<a rel=\"mw:ExtLink\" 
href=\"http://example.org\"; 
data-parsoid='{\"targetOff\":235,\"contentOffsets\":[235,235],\"dsr\":[216,236,19,1]}'></a></p>\n\n</div>\n");
-add("html2html", "Sanitizer: angle brackets are invalid, even in interwiki 
links (T182338)", "<p data-parsoid='{\"dsr\":[0,83,0,0]}'><a 
rel=\"mw:WikiLink/InterWiki\" 
href=\"http://www.usemod.com/cgi-bin/mb.pl?Foo&lt;Bar\"; 
title=\"meatball:Foo&lt;Bar\" 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"http://www.usemod.com/cgi-bin/mb.pl?Foo&lt;Bar\"},\"sa\":{\"href\":\"meatball:Foo&lt;Bar\"},\"isIW\":true,\"dsr\":[0,20,2,2]}'>meatball:Foo&lt;Bar</a>\n<a
 rel=\"mw:WikiLink/InterWiki\" 
href=\"http://www.usemod.com/cgi-bin/mb.pl?Foo>Bar\" title=\"meatball:Foo>Bar\" 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"http://www.usemod.com/cgi-bin/mb.pl?Foo>Bar\"},\"sa\":{\"href\":\"meatball:Foo>Bar\"},\"isIW\":true,\"dsr\":[21,41,2,2]}'>meatball:Foo>Bar</a>\n<a
 rel=\"mw:WikiLink/InterWiki\" 
href=\"http://www.usemod.com/cgi-bin/mb.pl?Foo&lt;bar\"; 
title=\"meatball:Foo&lt;bar\" 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"http://www.usemod.com/cgi-bin/mb.pl?Foo&lt;bar\"},\"sa\":{\"href\":\"meatball:Foo&lt;bar\"},\"isIW\":true,\"dsr\":[42,62,2,2]}'>meatball:Foo&lt;bar</a>\n<a
 rel=\"mw:WikiLink/InterWiki\" 
href=\"http://www.usemod.com/cgi-bin/mb.pl?Foo>bar\" title=\"meatball:Foo>bar\" 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"http://www.usemod.com/cgi-bin/mb.pl?Foo>bar\"},\"sa\":{\"href\":\"meatball:Foo>bar\"},\"isIW\":true,\"dsr\":[63,83,2,2]}'>meatball:Foo>bar</a></p>\n");
+add("html2html", "Sanitizer: angle brackets are invalid, even in interwiki 
links (T182338)", "<p data-parsoid='{\"dsr\":[0,83,0,0]}'><a 
rel=\"mw:WikiLink/Interwiki\" 
href=\"http://www.usemod.com/cgi-bin/mb.pl?Foo&lt;Bar\"; 
title=\"meatball:Foo&lt;Bar\" 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"http://www.usemod.com/cgi-bin/mb.pl?Foo&lt;Bar\"},\"sa\":{\"href\":\"meatball:Foo&lt;Bar\"},\"isIW\":true,\"dsr\":[0,20,2,2]}'>meatball:Foo&lt;Bar</a>\n<a
 rel=\"mw:WikiLink/Interwiki\" 
href=\"http://www.usemod.com/cgi-bin/mb.pl?Foo>Bar\" title=\"meatball:Foo>Bar\" 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"http://www.usemod.com/cgi-bin/mb.pl?Foo>Bar\"},\"sa\":{\"href\":\"meatball:Foo>Bar\"},\"isIW\":true,\"dsr\":[21,41,2,2]}'>meatball:Foo>Bar</a>\n<a
 rel=\"mw:WikiLink/Interwiki\" 
href=\"http://www.usemod.com/cgi-bin/mb.pl?Foo&lt;bar\"; 
title=\"meatball:Foo&lt;bar\" 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"http://www.usemod.com/cgi-bin/mb.pl?Foo&lt;bar\"},\"sa\":{\"href\":\"meatball:Foo&lt;bar\"},\"isIW\":true,\"dsr\":[42,62,2,2]}'>meatball:Foo&lt;bar</a>\n<a
 rel=\"mw:WikiLink/Interwiki\" 
href=\"http://www.usemod.com/cgi-bin/mb.pl?Foo>bar\" title=\"meatball:Foo>bar\" 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"http://www.usemod.com/cgi-bin/mb.pl?Foo>bar\"},\"sa\":{\"href\":\"meatball:Foo>bar\"},\"isIW\":true,\"dsr\":[63,83,2,2]}'>meatball:Foo>bar</a></p>\n");
 add("html2html", "Language converter glossary rules inside attributes 
(T119158)", "<p data-parsoid='{\"dsr\":[0,52,0,0]}'><meta 
typeof=\"mw:LanguageVariant\" 
data-mw-variant='{\"add\":true,\"oneway\":[{\"f\":\"foAjrjvi\",\"l\":\"sr-el\",\"t\":\"\\\"
 onload=\\\"alert(1)\\\" data-foo=\\\"\"}]}' 
data-parsoid='{\"fl\":[\"H\"],\"src\":\"-{H|foAjrjvi=>sr-el:\\\" 
onload=\\\"alert(1)\\\" 
data-foo=\\\"}-\",\"tSp\":[4],\"dsr\":[0,52,null,null]}'/></p>\n\n<p 
data-parsoid='{\"dsr\":[54,94,0,0]}'><figure-inline class=\"mw-default-size\" 
typeof=\"mw:Image\" 
data-parsoid='{\"optList\":[{\"ck\":\"alt\",\"ak\":\"alt=-{}-foAjrjvi-{}-\"}],\"dsr\":[54,94,null,null]}'><a
 href=\"./Датотека:Foobar.jpg\" 
data-parsoid='{\"a\":{\"href\":\"./Датотека:Foobar.jpg\"},\"sa\":{\"href\":\"File:Foobar.jpg\"}}'><img
 alt=\"foAjrjvi\" resource=\"./Датотека:Foobar.jpg\" 
src=\"//example.com/images/3/3a/Foobar.jpg\" data-file-width=\"1941\" 
data-file-height=\"220\" data-file-type=\"bitmap\" height=\"220\" 
width=\"1941\" 
data-parsoid='{\"a\":{\"alt\":\"foAjrjvi\",\"resource\":\"./Датотека:Foobar.jpg\",\"height\":\"220\",\"width\":\"1941\"},\"sa\":{\"alt\":\"alt=-{}-foAjrjvi-{}-\",\"resource\":\"File:Foobar.jpg\"}}'/></a></figure-inline></p>");
 add("html2html", "HTML ordered list item with parameters oddity", "<ol 
data-parsoid='{\"dsr\":[0,5,0,0]}'><li data-parsoid='{\"dsr\":[0,5,1,0]}'> 
One</li></ol>\n");
 add("html2html", "Special page transclusion", "<ul 
data-parsoid='{\"dsr\":[0,24,0,0]}'><li data-parsoid='{\"dsr\":[0,24,1,0]}'> <a 
rel=\"mw:WikiLink\" href=\"./Wiki/Xyzzyx\" title=\"Wiki/Xyzzyx\" 
data-parsoid='{\"stx\":\"piped\",\"a\":{\"href\":\"./Wiki/Xyzzyx\"},\"sa\":{\"href\":\"wiki/Xyzzyx\"},\"dsr\":[2,24,14,2]}'>Xyzzyx</a></li></ul>\n");
diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index 69dc17d..05f5281 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -4855,8 +4855,8 @@
 </p>
 !! html/parsoid
 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo";></a></p>
-<p><a rel="mw:WikiLink/InterWiki" href="http://en.wikipedia.org/wiki/Foo"; 
title="wikipedia:Foo">Bar</a></p>
-<p><a rel="mw:WikiLink/InterWiki" href="http://en.wikipedia.org/wiki/Foo"; 
title="wikipedia:Foo"><span>Bar</span></a></p>
+<p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo"; 
title="wikipedia:Foo">Bar</a></p>
+<p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo"; 
title="wikipedia:Foo"><span>Bar</span></a></p>
 !! end
 
 !! test
@@ -8656,7 +8656,7 @@
 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity"; class="extiw" 
title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
 </p>
 !! html/parsoid
-<p><a rel="mw:WikiLink/InterWiki" 
href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity"; 
title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
+<p><a rel="mw:WikiLink/Interwiki" 
href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity"; 
title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
 !! end
 
 !! test
@@ -8669,7 +8669,7 @@
 <p><a href="http://www.usemod.com/cgi-bin/mb.pl"; class="extiw" 
title="meatball:">MeatBall:</a>
 </p>
 !! html/parsoid
-<p><a rel="mw:WikiLink/InterWiki" href="http://www.usemod.com/cgi-bin/mb.pl?"; 
title="meatball:">MeatBall:</a></p>
+<p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?"; 
title="meatball:">MeatBall:</a></p>
 !! end
 
 ## html2wt and html2html will fail because we will prefer the :en: interwiki 
prefix over wikipedia:
@@ -8691,8 +8691,8 @@
 </ul>
 !! html/parsoid
 <ul>
-<li><a rel="mw:WikiLink/InterWiki" 
href="http://en.wikipedia.org/wiki/ro:Olteniţa"; 
title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
-<li><a rel="mw:WikiLink/InterWiki" 
href="http://en.wikipedia.org/wiki/ro:Olteniţa"; 
title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
+<li><a rel="mw:WikiLink/Interwiki" 
href="http://en.wikipedia.org/wiki/ro:Olteniţa"; 
title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
+<li><a rel="mw:WikiLink/Interwiki" 
href="http://en.wikipedia.org/wiki/ro:Olteniţa"; 
title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
 </ul>
 !! end
 
@@ -8721,7 +8721,7 @@
 !! html/parsoid
 <p><a rel="mw:WikiLink" href="./Main_Page#Is_this_great?" 
data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Is_this_great?"},"sa":{"href":"#Is
 this great?"}}'>#Is this great?</a>
 <a rel="mw:WikiLink" href="./Foo#Is_this_great?" title="Foo" 
data-parsoid='{"stx":"simple","a":{"href":"./Foo#Is_this_great?"},"sa":{"href":"Foo#Is
 this great?"}}'>Foo#Is this great?</a>
-<a rel="mw:WikiLink/InterWiki" 
href="http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great?"; 
title="meatball:Foo" 
data-parsoid='{"stx":"simple","a":{"href":"http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great?"},"sa":{"href":"meatball:Foo#Is
 this great?"},"isIW":true}'>meatball:Foo#Is this great?</a></p>
+<a rel="mw:WikiLink/Interwiki" 
href="http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great?"; 
title="meatball:Foo" 
data-parsoid='{"stx":"simple","a":{"href":"http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great?"},"sa":{"href":"meatball:Foo#Is
 this great?"},"isIW":true}'>meatball:Foo#Is this great?</a></p>
 !! end
 
 !! test
@@ -8761,19 +8761,19 @@
 
 [[  wikiPEdia :Foo]]
 !! html/parsoid
-<p><a rel="mw:WikiLink/InterWiki" href="//en.wikipedia.org/wiki/Foo" 
data-parsoid='{"stx":"simple","a":{"href":"//en.wikipedia.org/wiki/Foo"},"sa":{"href":":en:Foo"},"isIW":true}'
 title="en:Foo">en:Foo</a></p>
+<p><a rel="mw:WikiLink/Interwiki" href="//en.wikipedia.org/wiki/Foo" 
data-parsoid='{"stx":"simple","a":{"href":"//en.wikipedia.org/wiki/Foo"},"sa":{"href":":en:Foo"},"isIW":true}'
 title="en:Foo">en:Foo</a></p>
 
-<p><a rel="mw:WikiLink/InterWiki" href="//en.wikipedia.org/wiki/Foo" 
data-parsoid='{"stx":"piped","a":{"href":"//en.wikipedia.org/wiki/Foo"},"sa":{"href":":en:Foo"},"isIW":true}'
 title="en:Foo">Foo</a></p>
+<p><a rel="mw:WikiLink/Interwiki" href="//en.wikipedia.org/wiki/Foo" 
data-parsoid='{"stx":"piped","a":{"href":"//en.wikipedia.org/wiki/Foo"},"sa":{"href":":en:Foo"},"isIW":true}'
 title="en:Foo">Foo</a></p>
 
-<p><a rel="mw:WikiLink/InterWiki" href="http://en.wikipedia.org/wiki/Foo"; 
data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":"wikipedia:Foo"},"isIW":true}'
 title="wikipedia:Foo">wikipedia:Foo</a></p>
+<p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo"; 
data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":"wikipedia:Foo"},"isIW":true}'
 title="wikipedia:Foo">wikipedia:Foo</a></p>
 
-<p><a rel="mw:WikiLink/InterWiki" href="http://en.wikipedia.org/wiki/Foo"; 
data-parsoid='{"stx":"piped","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":":wikipedia:Foo"},"isIW":true}'
 title="wikipedia:Foo">Foo</a></p>
+<p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo"; 
data-parsoid='{"stx":"piped","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":":wikipedia:Foo"},"isIW":true}'
 title="wikipedia:Foo">Foo</a></p>
 
-<p><a rel="mw:WikiLink/InterWiki" href="http://en.wikipedia.org/wiki/en:Foo"; 
data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/en:Foo"},"sa":{"href":"wikipedia:en:Foo"},"isIW":true}'
 title="wikipedia:en:Foo">wikipedia:en:Foo</a></p>
+<p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/en:Foo"; 
data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/en:Foo"},"sa":{"href":"wikipedia:en:Foo"},"isIW":true}'
 title="wikipedia:en:Foo">wikipedia:en:Foo</a></p>
 
-<p><a rel="mw:WikiLink/InterWiki" href="http://en.wikipedia.org/wiki/en:Foo"; 
data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/en:Foo"},"sa":{"href":":wikipedia:en:Foo"},"isIW":true}'
 title="wikipedia:en:Foo">wikipedia:en:Foo</a></p>
+<p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/en:Foo"; 
data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/en:Foo"},"sa":{"href":":wikipedia:en:Foo"},"isIW":true}'
 title="wikipedia:en:Foo">wikipedia:en:Foo</a></p>
 
-<p><a rel="mw:WikiLink/InterWiki" href="http://en.wikipedia.org/wiki/Foo"; 
data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":";
  wikiPEdia :Foo"},"isIW":true}' title="wikipedia:Foo">  wikiPEdia :Foo</a></p>
+<p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo"; 
data-parsoid='{"stx":"simple","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":";
  wikiPEdia :Foo"},"isIW":true}' title="wikipedia:Foo">  wikiPEdia :Foo</a></p>
 !! end
 
 !! test
@@ -8793,9 +8793,9 @@
 <a rel="nofollow" class="external text" 
href="http://de.wikipedia.org/wiki/#foo";>is just fragment</a>
 </p>
 !! html/parsoid
-<p><a rel="mw:WikiLink/InterWiki" 
href="http://www.usemod.com/cgi-bin/mb.pl?ok"; 
title="meatball:ok">meatball:ok</a>
-<a rel="mw:WikiLink/InterWiki" 
href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo"; title="meatball:ok">ok with 
fragment</a>
-<a rel="mw:WikiLink/InterWiki" 
href="http://www.usemod.com/cgi-bin/mb.pl?ok_as_well?"; title="meatball:ok as 
well?">ok ending with ? mark</a>
+<p><a rel="mw:WikiLink/Interwiki" 
href="http://www.usemod.com/cgi-bin/mb.pl?ok"; 
title="meatball:ok">meatball:ok</a>
+<a rel="mw:WikiLink/Interwiki" 
href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo"; title="meatball:ok">ok with 
fragment</a>
+<a rel="mw:WikiLink/Interwiki" 
href="http://www.usemod.com/cgi-bin/mb.pl?ok_as_well?"; title="meatball:ok as 
well?">ok ending with ? mark</a>
 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history";>has 
query</a>
 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo";>is just 
fragment</a></p>
 !! end
@@ -8808,7 +8808,7 @@
 <p><a href="http://en.wikipedia.org/wiki/Foo"; class="extiw" 
title="wikipedia:Foo">Bar</a>
 </p>
 !! html/parsoid
-<p><a rel="mw:WikiLink/InterWiki" href="http://en.wikipedia.org/wiki/Foo"; 
data-parsoid='{"stx":"piped","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":"wikipedia:Foo"},"isIW":true,"tail":"r"}'
 title="wikipedia:Foo">Bar</a></p>
+<p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo"; 
data-parsoid='{"stx":"piped","a":{"href":"http://en.wikipedia.org/wiki/Foo"},"sa":{"href":"wikipedia:Foo"},"isIW":true,"tail":"r"}'
 title="wikipedia:Foo">Bar</a></p>
 !! end
 
 !! test
@@ -8862,7 +8862,7 @@
 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello"; class="extiw" 
title="meatball:Hello">local:meatball:Hello</a>
 </p>
 !! html/parsoid
-<p><a rel="mw:WikiLink/InterWiki" 
href="http://www.usemod.com/cgi-bin/mb.pl?Hello"; 
title="meatball:Hello">local:meatball:Hello</a></p>
+<p><a rel="mw:WikiLink/Interwiki" 
href="http://www.usemod.com/cgi-bin/mb.pl?Hello"; 
title="meatball:Hello">local:meatball:Hello</a></p>
 !! end
 
 !! test
@@ -8960,8 +8960,8 @@
 </p>
 !! html/parsoid
 <p>Blah blah blah
-<a rel="mw:WikiLink/InterWiki" href="http://es.wikipedia.org/wiki/Spanish"; 
title="es:Spanish">es:Spanish</a>
-<a rel="mw:WikiLink/InterWiki" href="http://zh.wikipedia.org/wiki/Chinese"; 
title="zh:Chinese"> zh : Chinese </a></p>
+<a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish"; 
title="es:Spanish">es:Spanish</a>
+<a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese"; 
title="zh:Chinese"> zh : Chinese </a></p>
 !! end
 
 !! test
@@ -8978,7 +8978,7 @@
 [[:::es:Spanish]]
 </p>
 !! html/parsoid
-<p><a rel="mw:WikiLink/InterWiki" href="http://es.wikipedia.org/wiki/Spanish"; 
title="es:Spanish">es:Spanish</a>
+<p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish"; 
title="es:Spanish">es:Spanish</a>
 [[::es:Spanish]]
 [[:::es:Spanish]]</p>
 !! end
@@ -9055,7 +9055,7 @@
 Blah blah blah
 [[zh:Chinese]]
 !! html/parsoid
-<p>Blah blah blah <a rel="mw:WikiLink/InterWiki" 
href="http://zh.wikipedia.org/wiki/Chinese"; 
title="zh:Chinese">zh:Chinese</a></p>
+<p>Blah blah blah <a rel="mw:WikiLink/Interwiki" 
href="http://zh.wikipedia.org/wiki/Chinese"; 
title="zh:Chinese">zh:Chinese</a></p>
 !! end
 
 ## PHP parser tests script needs an update
@@ -9069,7 +9069,7 @@
 Blah blah blah
 [[zh:Chinese]]
 !! html/parsoid
-<p>Blah blah blah <a rel="mw:WikiLink/InterWiki" 
href="http://zh.wikipedia.org/wiki/Chinese"; 
title="zh:Chinese">zh:Chinese</a></p>
+<p>Blah blah blah <a rel="mw:WikiLink/Interwiki" 
href="http://zh.wikipedia.org/wiki/Chinese"; 
title="zh:Chinese">zh:Chinese</a></p>
 !! end
 
 !! test
@@ -9156,7 +9156,7 @@
 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
 </p>
 !! html/parsoid
-<p><a rel="mw:WikiLink/InterWiki" href="http://es.wikipedia.org/wiki/"; 
title="es:">es:</a></p>
+<p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/"; 
title="es:">es:</a></p>
 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
 !! end
 
@@ -9184,7 +9184,7 @@
 </p>
 !! html/parsoid
 <p>Blah blah blah
-<a rel="mw:WikiLink/InterWiki" href="http://es.wikipedia.org/wiki/Spanish"; 
title="es:Spanish">local:es:Spanish</a></p>
+<a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish"; 
title="es:Spanish">local:es:Spanish</a></p>
 !! end
 
 !! test
@@ -15299,7 +15299,7 @@
 <p><a href="/wiki/File:Foobar.jpg" class="image" title="text with a 
MeatBall:Link in it"><img alt="text with a MeatBall:Link in it" 
src="http://example.com/images/3/3a/Foobar.jpg"; width="1941" height="220" /></a>
 </p>
 !! html/parsoid
-<p><figure-inline class="mw-default-size" typeof="mw:Image" 
data-parsoid='{"optList":[{"ck":"caption","ak":"text with a [[MeatBall:Link]] 
in it"}]}' data-mw='{"caption":"text with a &lt;a rel=\"mw:WikiLink/InterWiki\" 
href=\"http://www.usemod.com/cgi-bin/mb.pl?Link\"; title=\"meatball:Link\" 
data-parsoid=&#39;{\"stx\":\"simple\",\"a\":{\"href\":\"http://www.usemod.com/cgi-bin/mb.pl?Link\"},\"sa\":{\"href\":\"MeatBall:Link\"},\"isIW\":true,\"dsr\":[30,47,2,2]}&#39;>MeatBall:Link&lt;/a>
 in it"}'><a href="./File:Foobar.jpg" 
data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img 
resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" 
data-file-width="1941" data-file-height="220" data-file-type="bitmap" 
height="220" width="1941" 
data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
+<p><figure-inline class="mw-default-size" typeof="mw:Image" 
data-parsoid='{"optList":[{"ck":"caption","ak":"text with a [[MeatBall:Link]] 
in it"}]}' data-mw='{"caption":"text with a &lt;a rel=\"mw:WikiLink/Interwiki\" 
href=\"http://www.usemod.com/cgi-bin/mb.pl?Link\"; title=\"meatball:Link\" 
data-parsoid=&#39;{\"stx\":\"simple\",\"a\":{\"href\":\"http://www.usemod.com/cgi-bin/mb.pl?Link\"},\"sa\":{\"href\":\"MeatBall:Link\"},\"isIW\":true,\"dsr\":[30,47,2,2]}&#39;>MeatBall:Link&lt;/a>
 in it"}'><a href="./File:Foobar.jpg" 
data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img 
resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" 
data-file-width="1941" data-file-height="220" data-file-type="bitmap" 
height="220" width="1941" 
data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
 !! end
 
 !! test
@@ -15310,7 +15310,7 @@
 <p><a href="/wiki/File:Foobar.jpg" class="image" title="text with a link in 
it"><img alt="text with a link in it" 
src="http://example.com/images/3/3a/Foobar.jpg"; width="1941" height="220" /></a>
 </p>
 !! html/parsoid
-<p><figure-inline class="mw-default-size" typeof="mw:Image" 
data-parsoid='{"optList":[{"ck":"caption","ak":"text with a 
[[MeatBall:Link|link]] in it"}]}' data-mw='{"caption":"text with a &lt;a 
rel=\"mw:WikiLink/InterWiki\" href=\"http://www.usemod.com/cgi-bin/mb.pl?Link\"; 
title=\"meatball:Link\" 
data-parsoid=&#39;{\"stx\":\"piped\",\"a\":{\"href\":\"http://www.usemod.com/cgi-bin/mb.pl?Link\"},\"sa\":{\"href\":\"MeatBall:Link\"},\"isIW\":true,\"dsr\":[30,52,16,2]}&#39;>link&lt;/a>
 in it"}'><a href="./File:Foobar.jpg" 
data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img 
resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" 
data-file-width="1941" data-file-height="220" data-file-type="bitmap" 
height="220" width="1941" 
data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
+<p><figure-inline class="mw-default-size" typeof="mw:Image" 
data-parsoid='{"optList":[{"ck":"caption","ak":"text with a 
[[MeatBall:Link|link]] in it"}]}' data-mw='{"caption":"text with a &lt;a 
rel=\"mw:WikiLink/Interwiki\" href=\"http://www.usemod.com/cgi-bin/mb.pl?Link\"; 
title=\"meatball:Link\" 
data-parsoid=&#39;{\"stx\":\"piped\",\"a\":{\"href\":\"http://www.usemod.com/cgi-bin/mb.pl?Link\"},\"sa\":{\"href\":\"MeatBall:Link\"},\"isIW\":true,\"dsr\":[30,52,16,2]}&#39;>link&lt;/a>
 in it"}'><a href="./File:Foobar.jpg" 
data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img 
resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" 
data-file-width="1941" data-file-height="220" data-file-type="bitmap" 
height="220" width="1941" 
data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
 !! end
 
 !! test
@@ -18678,14 +18678,14 @@
 !! end
 
 !! test
-Sanitizer: Avoid unnecessary percent encoded characters in WikiLink/InterWiki 
links
+Sanitizer: Avoid unnecessary percent encoded characters in interwiki links
 !! wikitext
 [[meatball:Soft"Security]]
 !! html/php
 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Soft%22Security"; class="extiw" 
title="meatball:Soft&quot;Security">meatball:Soft"Security</a>
 </p>
 !! html/parsoid
-<p><a rel="mw:WikiLink/InterWiki" 
href='http://www.usemod.com/cgi-bin/mb.pl?Soft"Security' 
title='meatball:Soft"Security'>meatball:Soft"Security</a></p>
+<p><a rel="mw:WikiLink/Interwiki" 
href='http://www.usemod.com/cgi-bin/mb.pl?Soft"Security' 
title='meatball:Soft"Security'>meatball:Soft"Security</a></p>
 !! end
 
 !! test
@@ -20900,19 +20900,19 @@
 !! end
 
 !! test
-Gallery override link with WikiLink (T36852)
+Gallery override link with wikilink (T36852)
 !! options
 parsoid={
   "nativeGallery": true
 }
 !! wikitext
 <gallery>
-File:Foobar.jpg|alt=galleryalt|link=InterWikiLink
+File:Foobar.jpg|alt=galleryalt|link=Wikilink
 </gallery>
 !! html/php
 <ul class="gallery mw-gallery-traditional">
                <li class="gallerybox" style="width: 155px"><div style="width: 
155px">
-                       <div class="thumb" style="width: 150px;"><div 
style="margin:68px auto;"><a href="/wiki/InterWikiLink"><img alt="galleryalt" 
src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg"; 
width="120" height="14" 
srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, 
http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" 
/></a></div></div>
+                       <div class="thumb" style="width: 150px;"><div 
style="margin:68px auto;"><a href="/wiki/Wikilink"><img alt="galleryalt" 
src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg"; 
width="120" height="14" 
srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, 
http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" 
/></a></div></div>
                        <div class="gallerytext">
                        </div>
                </div></li>
@@ -20920,7 +20920,7 @@
 
 !! html/parsoid
 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" 
about="#mwt2" data-parsoid='{"dsr":[0,70,2,2]}' 
data-mw='{"name":"gallery","attrs":{},"body":{}}'>
-<li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 
150px; height: 150px;"><figure-inline typeof="mw:Image"><a 
href="./InterWikiLink"><img alt="galleryalt" resource="./File:Foobar.jpg" 
src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" 
data-file-width="1941" data-file-height="220" data-file-type="bitmap" 
height="14" width="120"/></a></figure-inline></div><div 
class="gallerytext"></div></li>
+<li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 
150px; height: 150px;"><figure-inline typeof="mw:Image"><a 
href="./Wikilink"><img alt="galleryalt" resource="./File:Foobar.jpg" 
src="//example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" 
data-file-width="1941" data-file-height="220" data-file-type="bitmap" 
height="14" width="120"/></a></figure-inline></div><div 
class="gallerytext"></div></li>
 </ul>
 !! end
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I757832290a1ce4c56d5a5cd9d8d702ae7dbdda91
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: C. Scott Ananian <canan...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to