Cscott has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/232533

Change subject: Bracketed links must also have at least one character after the 
protocol.
......................................................................

Bracketed links must also have at least one character after the protocol.

The regexp in Parser.php is:

$this->mExtLinkBracketedRegex = '/\[(((?i)' . $this->mUrlProtocols . ')' .
    self::EXT_LINK_URL_CLASS . '+)\p{Zs}*

This is after template expansion, of course, so we need to be a little
more careful in our tokenizer.  But we can still enforce the "at least
one character after protocol" rule.

Also tweak how this rule is enforced in the general URL tokenizer.
We were inadvertently disallowing "http://192.168.0.1"; as valid URL
since we were incorrectly enforcing "one character of path" and ignoring
the address portion.  Now the address counts toward the post-protocol
characters.

Related to I5d728e6ac388b6b2e71a0bda17164cb6de5cf96b (although that
dealt with autolinks).

This exposes a few more IPv6 parsing bugs (T23261) on the blacklist,
in sometimes surprising ways.  Generally we truncate URLs at the
open bracket so http://[abcd] used to be "valid" despite it parsing
as a bare protocol ("http://";).  Now these are generally invalid,
causing blacklist additions.

Change-Id: Id83841ff68500e27f8be33fc1d4e7868ab28a7a4
---
M lib/pegTokenizer.pegjs.txt
M tests/parserTests-blacklist.js
2 files changed, 18 insertions(+), 3 deletions(-)


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

diff --git a/lib/pegTokenizer.pegjs.txt b/lib/pegTokenizer.pegjs.txt
index d626d89..191a243 100644
--- a/lib/pegTokenizer.pegjs.txt
+++ b/lib/pegTokenizer.pegjs.txt
@@ -399,7 +399,12 @@
         "["
         & { return stops.push('extlink', true); }
         target:extlink_preprocessor_text
-        & { return Util.isProtocolValid(target, options.env); }
+        & {
+          // Protocol must be valid and there ought to be at least one
+          // post-protocol character.  So strip last char off target
+          // before testing protocol.
+          return Util.isProtocolValid(target.slice(0, -1), options.env);
+        }
         sp:$( space / [\u00A0\u1680\u180E\u2000-\u200A\u202F\u205F\u3000] )*
         targetOff:( "" { return endOffset(); })
         content:(
@@ -508,7 +513,9 @@
                     & "&" he:htmlentity { return he; }
                   / [&%{]
                 ) { return r; }
-         )+
+         )*
+         // Must be at least one character after the protocol
+         & { return addr !== null || path.length > 0; }
 {
     proto += addr || '';
     return tu.flattenString([proto].concat(path));
diff --git a/tests/parserTests-blacklist.js b/tests/parserTests-blacklist.js
index f5b3397..5f4e010 100644
--- a/tests/parserTests-blacklist.js
+++ b/tests/parserTests-blacklist.js
@@ -55,7 +55,7 @@
 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", "IPv6 urls, autolink format (T23261)", "<p 
data-parsoid='{\"dsr\":[0,41,0,0]}'><a rel=\"mw:ExtLink\" 
href=\"http://[2404:130:0:1000::187:2]/index.php\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[0,41,0,0]}'>http://[2404:130:0:1000::187:2]/index.php</a></p>\n\n<p
 data-parsoid='{\"dsr\":[43,78,0,0]}'>Examples from RFC2373, section 
2.2:</p>\n<ul data-parsoid='{\"dsr\":[79,277,0,0]}'><li 
data-parsoid='{\"dsr\":[79,119,1,0]}'> 
http://[1080::8:800:200C:417A]/unicast</li>\n<li 
data-parsoid='{\"dsr\":[120,150,1,0]}'> http://[FF01::101]/multicast</li>\n<li 
data-parsoid='{\"dsr\":[151,174,1,0]}'> http://[::1]/loopback</li>\n<li 
data-parsoid='{\"dsr\":[175,200,1,0]}'> http://[::]/unspecified</li>\n<li 
data-parsoid='{\"dsr\":[201,234,1,0]}'> 
http://[::13.1.68.3]/ipv4compat</li>\n<li 
data-parsoid='{\"dsr\":[235,277,1,0]}'> 
http://[::FFFF:129.144.52.38]/ipv4compat</li></ul>\n\n<p 
data-parsoid='{\"dsr\":[279,313,0,0]}'>Examples from <a 
href=\"//tools.ietf.org/html/rfc2732\" rel=\"mw:ExtLink\" 
data-parsoid='{\"stx\":\"magiclink\",\"dsr\":[293,301,0,0]}'>RFC 2732</a>, 
section 2:</p>\n<ul data-parsoid='{\"dsr\":[314,608,0,0]}'><li 
data-parsoid='{\"dsr\":[314,378,1,0]}'> 
http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html</li>\n<li 
data-parsoid='{\"dsr\":[379,427,1,0]}'> 
http://[1080:0:0:0:8:800:200C:417A]/index.html</li>\n<li 
data-parsoid='{\"dsr\":[428,460,1,0]}'> 
http://[3ffe:2a00:100:7031::1]</li>\n<li 
data-parsoid='{\"dsr\":[461,497,1,0]}'> 
http://[1080::8:800:200C:417A]/foo</li>\n<li 
data-parsoid='{\"dsr\":[498,525,1,0]}'> http://[::192.9.5.5]/ipng</li>\n<li 
data-parsoid='{\"dsr\":[526,571,1,0]}'> 
http://[::FFFF:129.144.52.38]:80/index.html</li>\n<li 
data-parsoid='{\"dsr\":[572,608,1,0]}'> 
http://[2010:836B:4179::836B:4179]</li></ul>\n");
-add("wt2html", "IPv6 urls, bracketed format (T23261)", "<p 
data-parsoid='{\"dsr\":[0,48,0,0]}'>[http://[2404:130:0:1000::187:2]/index.php 
test]</p>\n\n<p data-parsoid='{\"dsr\":[50,85,0,0]}'>Examples from RFC2373, 
section 2.2:</p>\n<ul data-parsoid='{\"dsr\":[86,297,0,0]}'><li 
data-parsoid='{\"dsr\":[86,128,1,0]}'> [http://[1080::8:800:200C:417A] 
unicast]</li>\n<li data-parsoid='{\"dsr\":[129,161,1,0]}'> [http://[FF01::101] 
multicast]</li>\n<li data-parsoid='{\"dsr\":[162,188,1,0]}'> [http://[::1]/ 
loopback]</li>\n<li data-parsoid='{\"dsr\":[189,216,1,0]}'> [http://[::] 
unspecified]</li>\n<li data-parsoid='{\"dsr\":[217,252,1,0]}'> 
[http://[::13.1.68.3] ipv4compat]</li>\n<li 
data-parsoid='{\"dsr\":[253,297,1,0]}'> [http://[::FFFF:129.144.52.38] 
ipv4compat]</li></ul>\n\n<p data-parsoid='{\"dsr\":[299,333,0,0]}'>Examples 
from <a href=\"//tools.ietf.org/html/rfc2732\" rel=\"mw:ExtLink\" 
data-parsoid='{\"stx\":\"magiclink\",\"dsr\":[313,321,0,0]}'>RFC 2732</a>, 
section 2:</p>\n<ul data-parsoid='{\"dsr\":[334,656,0,0]}'><li 
data-parsoid='{\"dsr\":[334,402,1,0]}'> 
[http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]</li>\n<li 
data-parsoid='{\"dsr\":[403,455,1,0]}'> 
[http://[1080:0:0:0:8:800:200C:417A]/index.html 2]</li>\n<li 
data-parsoid='{\"dsr\":[456,492,1,0]}'> [http://[3ffe:2a00:100:7031::1] 
3]</li>\n<li data-parsoid='{\"dsr\":[493,533,1,0]}'> 
[http://[1080::8:800:200C:417A]/foo 4]</li>\n<li 
data-parsoid='{\"dsr\":[534,565,1,0]}'> [http://[::192.9.5.5]/ipng 5]</li>\n<li 
data-parsoid='{\"dsr\":[566,615,1,0]}'> 
[http://[::FFFF:129.144.52.38]:80/index.html 6]</li>\n<li 
data-parsoid='{\"dsr\":[616,656,1,0]}'> [http://[2010:836B:4179::836B:4179] 
7]</li></ul>\n");
+add("wt2html", "IPv6 urls, bracketed format (T23261)", "<p 
data-parsoid='{\"dsr\":[0,48,0,0]}'>[<a rel=\"mw:ExtLink\" 
href=\"http://[2404:130:0:1000::187:2]/index.php\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[1,42,0,0]}'>http://[2404:130:0:1000::187:2]/index.php</a>
 test]</p>\n\n<p data-parsoid='{\"dsr\":[50,85,0,0]}'>Examples from RFC2373, 
section 2.2:</p>\n<ul data-parsoid='{\"dsr\":[86,297,0,0]}'><li 
data-parsoid='{\"dsr\":[86,128,1,0]}'> [http://[1080::8:800:200C:417A] 
unicast]</li>\n<li data-parsoid='{\"dsr\":[129,161,1,0]}'> [http://[FF01::101] 
multicast]</li>\n<li data-parsoid='{\"dsr\":[162,188,1,0]}'> [http://[::1]/ 
loopback]</li>\n<li data-parsoid='{\"dsr\":[189,216,1,0]}'> [http://[::] 
unspecified]</li>\n<li data-parsoid='{\"dsr\":[217,252,1,0]}'> 
[http://[::13.1.68.3] ipv4compat]</li>\n<li 
data-parsoid='{\"dsr\":[253,297,1,0]}'> [http://[::FFFF:129.144.52.38] 
ipv4compat]</li></ul>\n\n<p data-parsoid='{\"dsr\":[299,333,0,0]}'>Examples 
from <a href=\"//tools.ietf.org/html/rfc2732\" rel=\"mw:ExtLink\" 
data-parsoid='{\"stx\":\"magiclink\",\"dsr\":[313,321,0,0]}'>RFC 2732</a>, 
section 2:</p>\n<ul data-parsoid='{\"dsr\":[334,656,0,0]}'><li 
data-parsoid='{\"dsr\":[334,402,1,0]}'> 
[http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]</li>\n<li 
data-parsoid='{\"dsr\":[403,455,1,0]}'> 
[http://[1080:0:0:0:8:800:200C:417A]/index.html 2]</li>\n<li 
data-parsoid='{\"dsr\":[456,492,1,0]}'> [http://[3ffe:2a00:100:7031::1] 
3]</li>\n<li data-parsoid='{\"dsr\":[493,533,1,0]}'> 
[http://[1080::8:800:200C:417A]/foo 4]</li>\n<li 
data-parsoid='{\"dsr\":[534,565,1,0]}'> [http://[::192.9.5.5]/ipng 5]</li>\n<li 
data-parsoid='{\"dsr\":[566,615,1,0]}'> 
[http://[::FFFF:129.144.52.38]:80/index.html 6]</li>\n<li 
data-parsoid='{\"dsr\":[616,656,1,0]}'> [http://[2010:836B:4179::836B:4179] 
7]</li></ul>\n");
 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/    Chinese    
 \" 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"http://zh.wikipedia.org/wiki/
    Chinese     \"},\"sa\":{\"href\":\"   zh  :    Chinese     
\"},\"dsr\":[15,43,null,null]}'/>");
@@ -338,6 +338,7 @@
 add("wt2wt", "Bug 2702: Mismatched <i>, <b> and <a> tags are invalid", 
"''[http://example.com text''<nowiki/>'']''\n[http://example.com 
'''text''']'''<nowiki/>'''\n''Something [http://example.com in 
italic''<nowiki/>'']''\n''Something [http://example.com mixed''''', even 
bold''''']'''\n'''''Now [http://example.com both'''''<nowiki/>''''']'''''\n");
 add("wt2wt", "External link containing double-single-quotes with no space 
separating the url from text in italics", 
"[http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm ''La muerte de 
Casagemas'' (1901) en el sitio de ][[Museo Picasso (ParĂ­s)|Museo Picasso]].\n");
 add("wt2wt", "IPv6 urls, autolink format (T23261)", 
"http://&#x5B;2404:130:0:1000::187:2&#x5D;/index.php\n\nExamples from RFC2373, 
section 2.2:\n* http://[1080::8:800:200C:417A]/unicast\n* 
http://[FF01::101]/multicast\n* http://[::1]/loopback\n* 
http://[::]/unspecified\n* http://[::13.1.68.3]/ipv4compat\n* 
http://[::FFFF:129.144.52.38]/ipv4compat\n\nExamples from RFC 2732, section 
2:\n* http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html\n* 
http://[1080:0:0:0:8:800:200C:417A]/index.html\n* 
http://[3ffe:2a00:100:7031::1]\n* http://[1080::8:800:200C:417A]/foo\n* 
http://[::192.9.5.5]/ipng\n* http://[::FFFF:129.144.52.38]:80/index.html\n* 
http://[2010:836B:4179::836B:4179]\n";);
+add("wt2wt", "IPv6 urls, bracketed format (T23261)", 
"[http://&#x5B;2404:130:0:1000::187:2&#x5D;/index.php test]\n\nExamples from 
RFC2373, section 2.2:\n* [http://[1080::8:800:200C:417A] unicast]\n* 
[http://[FF01::101] multicast]\n* [http://[::1]/ loopback]\n* [http://[::] 
unspecified]\n* [http://[::13.1.68.3] ipv4compat]\n* 
[http://[::FFFF:129.144.52.38] ipv4compat]\n\nExamples from RFC 2732, section 
2:\n* [http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]\n* 
[http://[1080:0:0:0:8:800:200C:417A]/index.html 2]\n* 
[http://[3ffe:2a00:100:7031::1] 3]\n* [http://[1080::8:800:200C:417A]/foo 4]\n* 
[http://[::192.9.5.5]/ipng 5]\n* [http://[::FFFF:129.144.52.38]:80/index.html 
6]\n* [http://[2010:836B:4179::836B:4179] 7]\n");
 add("wt2wt", "Unclosed and unmatched quotes", "'''''Bold italic text '''with 
bold deactivated''' in between.'''''\n\n'''''Bold italic text ''with italic 
deactivated'' in between.'''''\n\n'''Bold text..'''\n\n..spanning two 
paragraphs (should not work).'''<nowiki/>'''\n\n'''Bold tag left 
open'''\n\n''Italic tag left open''\n\nNormal text.\n\n<!-- Unmatching number 
of opening, closing tags: -->\n'''This year'<nowiki/>'''s election ''should'' 
beat '''last year''''s.\n\n''Tom'''s car is bigger than 
'''''<nowiki/>'''Susan'''s.\n\nPlain ''italic'''s plain\n");
 add("wt2wt", "A table with captions with non-default spaced attributes and a 
table row", "{|\n|+ style=\"color: red;\" |caption2\n|+ style=\"color: red;\" | 
caption3\n|-\n| foo\n|}");
 add("wt2wt", "Table td-cell syntax variations", "{|\n| foo bar | baz\n| foo 
bar foo || baz\n| style=\"color:red;\" | baz\n| style='color:red;' || baz\n|}");
@@ -1609,6 +1610,13 @@
 add("selser", "IPv6 urls, autolink format (T23261) 
[0,2,[2],0,2,4,1,4,[0,4,1,0,1,2,3,4,[4],0,4,0,0],3]", 
"http://[2404:130:0:1000::187:2]/index.php\n\n2e6c9qy0l3m1jor\n\n1hm16gmimvbtvs4iExamples
 from RFC2373, section 2.2:\n\ncs5tzf2ji8yhw7b9\n* 
http://[1080::8:800:200C:417A]/unicast\n* http://[FF01::101]/multicast\n* 
http://[::1]/loopback\n* http://[::]/unspecified\n* 
http://[::13.1.68.3]/ipv4compat\n* 
http://[::FFFF:129.144.52.38]/ipv4compat\nasso6pf3zn5yu8fr\n\nExamples from RFC 
2732, section 2:\n\n84y5hqhfov42t9\n* 
http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html\n* 
yd96c94gwj73z0k9\n* http://[1080:0:0:0:8:800:200C:417A]/index.html\n* 
http://[3ffe:2a00:100:7031::1]\n* 5lqpjf9squth85mi\n* 
u8ea4l7i6u56zuxr\n*3pf3bmp3bkervn29\n* 4m87ahilxdnghkt9\n* 
http://[2010:836B:4179::836B:4179]\n";);
 add("selser", "IPv6 urls, autolink format (T23261) 
[1,0,3,0,[2,0,[4],0,4,0,[4],0,[3],0,0],0,1,0,[[3],0,3,4,[3],0,4,0,[4],0,1,3,0],3]",
 "http://[2404:130:0:1000::187:2]/index.php\n\n* 1xlw89h6txd2t9\n* 
http://[1080::8:800:200C:417A]/unicast\n*cqufukswkp1d1jor\n* 
vmqzz1cbftsdobt9\n*zy15lpor0j7zaor\n*\n* 
http://[::FFFF:129.144.52.38]/ipv4compat\n\nExamples from RFC 2732, section 
2:\n*\n* 7gbanjusqfv9rudi\n*\n* yyoa16vwvzd26gvi\n*gmq92kwvew89f6r\n* 
http://[::FFFF:129.144.52.38]:80/index.html\n* 
http://[2010:836B:4179::836B:4179]";);
 add("selser", "IPv6 urls, autolink format (T23261) 
[[2],0,1,0,3,3,2,4,[4,0,0,3,4,0,3,0,0,0,0,3,2],0]", 
"5wfwxl6fl9q0vn29<nowiki/>http://[2404:130:0:1000::187:2]/index.php\n\nExamples 
from RFC2373, section 2.2:\n\nwgtqsgg5d5sqyqfr\n\nExamples from RFC 2732, 
section 2:\n\navtuoiq1794tpgb9\n* 50nmxf1m0w0l766r\n* 
http://[1080:0:0:0:8:800:200C:417A]/index.html\n* u1ftbujihl8wu3di\n* 
http://[::192.9.5.5]/ipng\n* http://[::FFFF:129.144.52.38]:80/index.html\n* 
mptfckjbzi553ik9\n* http://[2010:836B:4179::836B:4179]\n";);
+add("selser", "IPv6 urls, bracketed format (T23261) 
[2,0,2,0,[1,2,1,0,[3],0,0,0,0,0,1],0,0,0,[1,2,0,0,1,0,[4],3,2,0,0,0,1],4]", 
"w4qfalupnykz9f6r\n\n[http://[2404:130:0:1000::187:2]/index.php 
test]\n\naka3hmsildefusor\n\nExamples from RFC2373, section 2.2:\n* 
[http://[1080::8:800:200C:417A] unicast]\n* zwi9rd7kt5z2rzfr\n* 
[http://[FF01::101] multicast]\n*\n* [http://[::] unspecified]\n* 
[http://[::13.1.68.3] ipv4compat]\n* [http://[::FFFF:129.144.52.38] 
ipv4compat]\n\nExamples from RFC 2732, section 2:\n* 
[http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]\n* 
b6ff4fuwdas5g66r\n* [http://[1080:0:0:0:8:800:200C:417A]/index.html 2]\n* 
[http://[3ffe:2a00:100:7031::1] 3]\n*qz7gfu2fdtbxd2t9\n* qadtnq6padhx5hfr\n* 
[http://[::192.9.5.5]/ipng 5]\n* [http://[::FFFF:129.144.52.38]:80/index.html 
6]\n* [http://[2010:836B:4179::836B:4179] 7]\nmdhhw6lx66crf6r\n");
+add("selser", "IPv6 urls, bracketed format (T23261) [1,3,1,0,1,0,3,0,1,2]", 
"[http://[2404:130:0:1000::187:2]/index.php test]\n\nExamples from RFC2373, 
section 2.2:\n* [http://[1080::8:800:200C:417A] unicast]\n* [http://[FF01::101] 
multicast]\n* [http://[::1]/ loopback]\n* [http://[::] unspecified]\n* 
[http://[::13.1.68.3] ipv4compat]\n* [http://[::FFFF:129.144.52.38] 
ipv4compat]\n\n* 
[http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]\n* 
[http://[1080:0:0:0:8:800:200C:417A]/index.html 2]\n* 
[http://[3ffe:2a00:100:7031::1] 3]\n* [http://[1080::8:800:200C:417A]/foo 4]\n* 
[http://[::192.9.5.5]/ipng 5]\n* [http://[::FFFF:129.144.52.38]:80/index.html 
6]\n* [http://[2010:836B:4179::836B:4179] 7]\nylaxtj1na899hpvi\n");
+add("selser", "IPv6 urls, bracketed format (T23261) 
[[2,0,3],2,4,4,[2,0,0,0,[4],4,3,0,[4],0,2],0,2,4,[[3],0,0,4,1,4,4,0,0,0,2,3,1],0]",
 
"4loj1g0b4enopqfr[http://[2404:130:0:1000::187:2]/index.php\n\nbq5ur5jghyc766r\n\nsu4dk5qojb8rggb9\n\naejeb15ifh90y66r\n*
 9ielr196muhxgvi\n* [http://[1080::8:800:200C:417A] unicast]\n* 
[http://[FF01::101] multicast]\n*4398veu62t5fusor\n* 
b0j65g64g3u15rk9\n*0hneatj7aihbmx6r\n* maid257q2eghkt9\n* 
[http://[::FFFF:129.144.52.38] ipv4compat]\n\nd8gll3h6g6ekx1or\n\nExamples from 
RFC 2732, section 2:\n\njo2bmjhldjf9a4i\n*\n* 
[http://[1080:0:0:0:8:800:200C:417A]/index.html 2]\n* 8um06gyhf5tjfw29\n* 
[http://[3ffe:2a00:100:7031::1] 3]\n* s226rcty21fc4n29\n* qsa61rn8qdh4obt9\n* 
[http://[::192.9.5.5]/ipng 5]\n* wj591nm58ojsv2t9\n* 
[http://[::FFFF:129.144.52.38]:80/index.html 6]\n* 
[http://[2010:836B:4179::836B:4179] 7]\n");
+add("selser", "IPv6 urls, bracketed format (T23261) 
[1,0,1,0,[1,0,0,0,[4],4,[2],0,0,2,3],0,3,3,4,2]", 
"[http://[2404:130:0:1000::187:2]/index.php test]\n\nExamples from RFC2373, 
section 2.2:\n* [http://[1080::8:800:200C:417A] unicast]\n* [http://[FF01::101] 
multicast]\n*kiuipzvcl7agiudi\n* n8sc9y74vzi1kyb9\n*1nqvqe21faiz4cxr 
[http://[::] unspecified]\n* [http://[::13.1.68.3] ipv4compat]\n* 
ger1q87199e5qaor\n\ntrsd81mbn9418aor\n\ncg6bltbembexko6r\n");
+add("selser", "IPv6 urls, bracketed format (T23261) 
[[2,0,0],0,1,3,[3,0,[3],3,3,3,0,0,1,2,[2]],0,[2,[3],3],4,2,2]", 
"dpxubroztqi1kyb9[http://[2404:130:0:1000::187:2]/index.php test]\n\nExamples 
from RFC2373, section 2.2:\n*\n* [http://[::] unspecified]\n* 
[http://[::13.1.68.3] ipv4compat]\n* 906ccj8dza7nwmi\n*0dfejab033rqkt9 
[http://[::FFFF:129.144.52.38] ipv4compat]\n\n9yi0v4i9rzw4gqfrExamples from 
[//tools.ietf.org/html/rfc2732 ]\n\n43zgjgdoyrs5rk9\n\niiwbmj54o4c59udi\n* 
[http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]\n* 
[http://[1080:0:0:0:8:800:200C:417A]/index.html 2]\n* 
[http://[3ffe:2a00:100:7031::1] 3]\n* [http://[1080::8:800:200C:417A]/foo 4]\n* 
[http://[::192.9.5.5]/ipng 5]\n* [http://[::FFFF:129.144.52.38]:80/index.html 
6]\n* [http://[2010:836B:4179::836B:4179] 7]\n14vsvb8lbejc3di\n");
+add("selser", "IPv6 urls, bracketed format (T23261) 
[2,4,4,2,[2,2,[4],0,[4],0,3,2,3,2,4],0,[0,3,2],2,[4,3,[2],0,3,2,4,0,0,0,0,2,4],3]",
 "r8mc0x9m86w29\n\n[http://[2404:130:0:1000::187:2]/index.php 
test]\n\ney90otxddmhlrf6r\n\nvldsbj6wlikymn29\n\nv0mlmnz2ms0xusor\n* 
r1fwnj79dmv4pldi\n* [http://[1080::8:800:200C:417A] unicast]\n* 
yc49o9ec65p9o1or\n*swtp6zirnm0wwmi\n*as87mrpje4p9zfr\n* 8dq7g6g4oiebfbt9\n* 
7t7q8lh7vfopf1or\n* pveahkk6j56x0f6r\n\nExamples from hy46042z2fpc766r, section 
2:\n\nq60pc01bmc0afw29\n* 9n851fzddu545cdi\n*gnduuwbj3ys0pb9 
[http://[1080:0:0:0:8:800:200C:417A]/index.html 2]\n* 88b33hvlp67gmn29\n* 
t8gd6exag67gmn29\n* [http://[::192.9.5.5]/ipng 5]\n* 
[http://[::FFFF:129.144.52.38]:80/index.html 6]\n* pa03zxzcum5tgldi\n* 
0mpzyjcl50rltyb9");
+add("selser", "IPv6 urls, bracketed format (T23261) 
[[0,2,0],4,[2],2,[1,3,1,0,[3],2,4,3,[3],2,1],0,[0,3,0],0,[1,0,0,0,[2],2,[2],4,[3],4,0,0,[3]],2]",
 "[3j8pbjj7aovzehfr<nowiki/>http://[2404:130:0:1000::187:2]/index.php 
test]\n\nzzfmllt0qoq7iudi\n\ngglj5oewapirizfrExamples from RFC2373, section 
2.2:\n\nw3j32grhujotuik9\n* [http://[1080::8:800:200C:417A] unicast]\n* 
[http://[FF01::101] multicast]\n*\n* 1a60jy2gf58w7b9\n* jpk3z738n3aqbyb9\n*\n* 
jahr0syy8wtdquxr\n* [http://[::FFFF:129.144.52.38] ipv4compat]\n\nExamples from 
, section 2:\n* [http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 
1]\n* [http://[1080:0:0:0:8:800:200C:417A]/index.html 2]\n*jwnhh2isyqc6usor 
[http://[3ffe:2a00:100:7031::1] 3]\n* x534d18ilgyl23xr\n*a806emsnbyq77gb9 
[http://[1080::8:800:200C:417A]/foo 4]\n* v6w52jxgvjlnxw29\n*\n* 
9qma4fszhpaurf6r\n* [http://[::FFFF:129.144.52.38]:80/index.html 
6]\n*\n5w48q4pvh3yp66r\n");
 add("selser", "mw:ExtLink linking to a interwiki URL can be round-tripped 
losslessly (T94723) [[[4]]]", "[[wikipedia:European_Robin|w8te4gwhsniv0a4i]]");
 add("selser", "mw:ExtLink linking to a interwiki URL can be round-tripped 
losslessly (T94723) [[[2]]]", 
"[[wikipedia:European_Robin|jtvcvll5n6x0f6rEuropean Robin]]");
 add("selser", "Unclosed and unmatched quotes 
[[[0,0,4]],2,3,3,[1],0,4,0,1,2,[[2]],3,3,3,2,0,3,4,1,2,2]", "'''''Bold italic 
text '''with bold deactivated0bet2nehr3gl23xr''\n\nmveau9dj2krl766r\n\n'''Bold 
text..'''\n\ny75pk6fh55lba9k9\n\n'''Bold tag left 
open\n\nivecp7jd69h8semi\n\n''939vypv7nzalwhfrItalic tag left 
open''\n\n4jx8l4e2s9kymn29\n<!-- Unmatching number of opening, closing tags: 
-->\nftnac0njf7i1wcdi\n\n''Tom'''s car is bigger than 
'''''<nowiki/>'''Susan'''s.\n\nwv6k36cpnikbuik9\n\nvtz1rewhs7i7ldi\n\nPlain 
''italic'''s plain");

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id83841ff68500e27f8be33fc1d4e7868ab28a7a4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Cscott <[email protected]>

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

Reply via email to