From: Arlo Breault
!! html/parsoid
-
+
!! end
!! test
@@ -4670,7 +4670,7 @@ Definition Lists: Mixed Lists: Test 13
!! end
# FIXME: Maybe get rid of this test?
-# From whitelist:
+# From old whitelist description:
# * The test is wrong, there are two colons where there should be :;
# * The PHP parser is wrong to close the after the
.
!! test
@@ -4828,9 +4828,9 @@ Numbered: [3]
Numbered: -Numbered: -Numbered:
+Numbered: +Numbered: +Numbered:
!!end !! test @@ -4869,7 +4869,7 @@ External links: dollar sign in URL (autonumber) !! html/parsoid - + !!end !! test @@ -4882,7 +4882,7 @@ http://example.com/1[2345http://example.com/1[2345
!! html/parsoid -http://example.com/1[2345
+http://example.com/1[2345
!! end !! test @@ -4895,7 +4895,7 @@ parsoid=wt2html,html2html !! html/parsoid - + !!end # parsoid adds a space before the link name @@ -4956,7 +4956,7 @@ External links: protocol-relative URL in brackets without text !! html/parsoid - + !! end !! test @@ -4994,7 +4994,7 @@ parsoid=wt2html,wt2wt !! html/parsoid - + !! end @@ -5043,25 +5043,25 @@ http://example.com/url_with_entity< http://example.com/url_with_entity< !! html/parsoid -http://example.com, -http://example.com; -http://example.com\ -http://example.com. -http://example.com: -http://example.com! -http://example.com? -http://example.com) -http://example.com/url_with_(brackets) -(http://example.com/url_without_brackets) -http://example.com/url_with_entity& -http://example.com/url_with_entity& -http://example.com/url_with_entity& -http://example.com/url_with_entity -http://example.com/url_with_entity -http://example.com/url_with_entity -http://example.com/url_with_entity< -http://example.com/url_with_entity< -http://example.com/url_with_entity<
+http://example.com, +http://example.com; +http://example.com\ +http://example.com. +http://example.com: +http://example.com! +http://example.com? +http://example.com) +http://example.com/url_with_(brackets) +(http://example.com/url_without_brackets) +http://example.com/url_with_entity& +http://example.com/url_with_entity& +http://example.com/url_with_entity& +http://example.com/url_with_entity +http://example.com/url_with_entity +http://example.com/url_with_entity +http://example.com/url_with_entity< +http://example.com/url_with_entity< +http://example.com/url_with_entity<
!! end !! test @@ -5074,7 +5074,7 @@ http://example.com/url_with_entity&http://example.com/url_with_entity&
!! html/parsoid -http://example.com/url_with_entity&
+http://example.com/url_with_entity&
!! end !! test @@ -5089,7 +5089,7 @@ news:'a'b''c''d e !! html/parsoidNews: Stuff here
-news:'a'bcd e
+news:'a'bcd e
!! end !! test @@ -5100,7 +5100,7 @@ External links: with entity !! html/parsoid - + !! end !! test @@ -5233,7 +5233,7 @@ URL in text: [http://example.com http://example.com]URL in text: http://example.com
!! html/parsoid -URL in text: http://example.com
+URL in text: http://example.com
!! end !! test @@ -5244,7 +5244,7 @@ ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/ !! html/parsoid - + !! end !! test @@ -5264,7 +5264,7 @@ Old & use: http://x&yOld & use: http://x&y
!! html/parsoid -Old & use: http://x&y
+Old & use: http://x&y
!! end !! test @@ -5275,7 +5275,7 @@ http://example.com/?foo=bar !! html/parsoid - + !! end ## @@ -5292,7 +5292,7 @@ Old & use: [http://x&y]Old & use: [1]
!! html/parsoid - + !! end # note that parsoid html is identical to [raw ampersand] case; so html2wt @@ -5307,7 +5307,7 @@ Old & use: [http://x&y]Old & use: [1]
!! html/parsoid - + !! end !! test @@ -5318,7 +5318,7 @@ External links: [raw equals] !! html/parsoid - + !! end # note that parsoid html is identical to [raw equals] case; so html2wt @@ -5333,7 +5333,7 @@ parsoid=wt2html,wt2wt,html2html !! html/parsoid - + !! end # xxx parsoid strips the IDN character, so the round-trip tests will @@ -5348,7 +5348,7 @@ parsoid=wt2html,wt2wt,html2html !! html/parsoid - + !! end # FIXME: This test (the IDN characters in the text of a link) is an inconsistency. @@ -5380,7 +5380,7 @@ http://example.com/ !! html/parsoid - + !! end !! test @@ -5401,7 +5401,7 @@ External links: URL within URL (T2002) !! html/parsoid - + !! end !! test @@ -5439,7 +5439,7 @@ http://www.example.com/html !! html/parsoid - + !! end !! test @@ -5512,8 +5512,8 @@ parsoid=wt2html,html2htmltest wikilink embedded in ext link
!! html/parsoid -wikilink embedded in ext link
-test wikilink embedded in ext link
+wikilink embedded in ext link
+test wikilink embedded in ext link
!! end !! test @@ -5557,8 +5557,8 @@ parsoid=wt2html{{echo|[[Foo}}
!! html/parsoid - - + +[[Foo
{{echo|[[Foo}}
!! end @@ -5595,6 +5595,27 @@ parsoid=wt2html[[Foo|]]
!! end +!! article +Template:pipe page +!! text +Main|Page +!! endarticle + +## FIXME: Parsoid doesn't support this and may never. See T226523 +!! test +Template returning pipe used in wikilink target +!! wikitext +[[{{pipe page}}]] +!! html/php+tidy +Page +
+!! html/parsoid +[[Main|Page]]
+!! end + +# Italic/link nesting is changed in this test, but the rendered result is the +# same. Currently the result is actually an improvement over the MediaWiki +# output. !! test T4702: Mismatched , and tags are invalid !! wikitext @@ -5603,13 +5624,19 @@ T4702: Mismatched , and tags are invalid ''Something [http://example.com in italic''] ''Something [http://example.com mixed''''', even bold]''' '''''Now [http://example.com both'''''] -!! html +!! html/phptext text Something in italic Something mixed, even bold Now both
+!! html/parsoid +text +text +Something in italic +Something mixed, even bold' +Now both
!! end @@ -5621,7 +5648,7 @@ http://www.example.com/?title=AT%26Thttp://www.example.com/?title=AT%26T
!! html/parsoid -http://www.example.com/?title=AT%26T
+http://www.example.com/?title=AT%26T
!! end # According to https://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain @@ -5634,7 +5661,7 @@ http://www.example.com/?title=100%25_Branhttp://www.example.com/?title=100%25_Bran
!! html/parsoid -http://www.example.com/?title=100%25_Bran
+http://www.example.com/?title=100%25_Bran
!! end !! test @@ -5645,7 +5672,7 @@ http://www.example.com/?title=Ben-Hur_%281959_film%29http://www.example.com/?title=Ben-Hur_%281959_film%29
!! html/parsoid -http://www.example.com/?title=Ben-Hur_%281959_film%29
+http://www.example.com/?title=Ben-Hur_%281959_film%29
!! end @@ -5657,7 +5684,7 @@ T6781: %26 in autonumber URL !! html/parsoid - + !! end !! test @@ -5668,7 +5695,7 @@ T6781, T7267: %26 in autonumber URL !! html/parsoid - + !! end !! test @@ -5679,7 +5706,7 @@ T6781, T7267: %28, %29 in autonumber URL !! html/parsoid - + !! end @@ -5691,7 +5718,7 @@ T6781: %26 in bracketed URL !! html/parsoid - + !! end !! test @@ -5711,7 +5738,7 @@ T6781, T7267: %28, %29 in bracketed URL !! html/parsoid - + !! end !! test @@ -5725,8 +5752,8 @@ External link containing a period in the anchor. (T65947) !! html/parsoid - - + + !! end !! test @@ -5740,8 +5767,8 @@ External link containing a single quote. (T65947) !! html/parsoid - - + + !! end !! test @@ -5771,7 +5798,7 @@ External link containing double-single-quotes with no space separating the url fLa muerte de Casagemas (1901) en el sitio de Museo Picasso.
!! html/parsoid -La muerte de Casagemas (1901) en el sitio de Museo Picasso.
+La muerte de Casagemas (1901) en el sitio de Museo Picasso.
!! end !! test @@ -5782,7 +5809,7 @@ External link with comments in link text !! html/parsoid - + !! end !! test @@ -5793,7 +5820,7 @@ External link to bare IPv4 address !! html/parsoid - + !! end !! test @@ -5825,9 +5852,9 @@ http://example.com/index.php?foozoid[]=barhttp://example.com/index.php?foozoid%5B%5D=bar
!! html/parsoid -http://example.com/index.php?foozoid%5B%5D=bar
+http://example.com/index.php?foozoid%5B%5D=bar
-http://example.com/index.php?foozoid%5B%5D=bar
+http://example.com/index.php?foozoid%5B%5D=bar
!! end !! test @@ -5873,24 +5900,24 @@ Examples from RFC 2732, section 2:http://[2404:130:0:1000::187:2]/index.php
+http://[2404:130:0:1000::187:2]/index.php
Examples from RFC 2373, section 2.2:
-Examples from RFC 2732, section 2:
-Examples from RFC 2373, section 2.2:
- +Examples from RFC 2732, section 2:
- + !! end !! test @@ -5999,7 +6026,7 @@ Non-extlinks in brackets [fool's] errand [fool's errand] [url=foo] -[url=http://example.com] +[url=http://example.com] [http:// bare protocols don't count] !! end @@ -6011,7 +6038,7 @@ Percent encoding in external links !! html/parsoid - + !! end !! test @@ -6022,7 +6049,7 @@ http://example.com !! html/parsoid - + !! end !! test @@ -6054,14 +6081,14 @@ http://example.com/a)b !! html/parsoid - - - - - -(http://example.com/(test)))))
- - + + + + + +(http://example.com/(test)))))
+ + !! end !! test @@ -6075,9 +6102,9 @@ Parenthesis in external links, w/ transclusion or comment !! html/parsoid - + - + !! end !! test @@ -6654,6 +6681,8 @@ Allow +/- in 2nd and later cells in a row, in 1st cell when td-attrs are present !!end +# Differences between Parsoid and PHP re: trailing whitespace in a +# table cell. !! test Table rowspan !! wikitext @@ -6665,7 +6694,7 @@ Table rowspan |Cell 1, row 2 |Cell 3, row 2 |} -!! html +!! html/phpCell 1, row 1 @@ -6679,6 +6708,15 @@ Table rowspan | Cell 3, row 2 |
Cell 1, row 1 | +Cell 2, row 1 (and 2) | +Cell 3, row 1 |
Cell 1, row 2 | +Cell 3, row 2 |
[ftp://%7Cx | ]" onmouseover="alert(document.cookie)">test |
Special:ThisNameWillHopefullyNeverBeUsed#anchor
+!! html/parsoid +Special:ThisNameWillHopefullyNeverBeUsed#anchor
!! end !! test @@ -8170,7 +8215,7 @@ Plain link to URL[[1]]
!! html/parsoid - + !! end !! test @@ -8199,7 +8244,7 @@ Plain link to protocol-relative URL[[1]]
!! html/parsoid - + !! end !! test @@ -8242,7 +8287,7 @@ Piped link to URL: [[http://www.example.com|an example URL]]Piped link to URL: [example URL]
!! html/parsoid -Piped link to URL: [example URL]
+Piped link to URL: [example URL]
!! end !! test @@ -8264,13 +8309,13 @@ parsoid=wt2html !! html/parsoid - + -[|123]
+[|123]
-{{echo|[|123}}
+{{echo|[|123}}
- + !! end !! test @@ -8867,8 +8912,8 @@ Interwiki links that cannot be represented in wiki syntaxmeatball:ok ok with fragment ok ending with ? mark -has query -is just fragment
+has query +is just fragment !! end !! test @@ -11445,7 +11490,7 @@ X[https://tools.ietf.org/html/rfc1234 foo] !! html/parsoidXfoo
-Xfoo
+Xfoo
!! end !! test @@ -11505,14 +11550,44 @@ Template with invalid target containing wikilink{{Main Page}}
!! end +# The html2html output of this test is currently failing +# because the html2wt output is broken; see +# https://phabricator.wikimedia.org/T220018#5123777 for a discussion. +# Not (yet) including html2wt as a test mode because there are +# a couple of different correct ways this could be{{ }} +
!! html/parsoid{{ }}
!! end +# This is currently the wikitext output of html2wt on the above test +# case; note that it is broken! Adding a{{echo|{{ }}}} +
+!! html/parsoid +{{echo|{{ }}}}
+!! end + !! article Template:test !! text @@ -11893,9 +11968,11 @@ Template:loop2 Template infinite loop !! wikitext {{loop1}} -!! html +!! html/phpTemplate loop detected: Template:Loop1
+!! html/parsoid +Template loop detected: Template:Loop1
!! end !! test @@ -12034,7 +12111,7 @@ Templates with intersecting and overlapping rangesha
ho
{{}} +
+!! html/parsoid +{{}}
!! end ## Remex doesn't account for fostered content. @@ -19973,7 +20110,7 @@ http://example.comhttp://example.com junk
!! html/parsoid -http://example.com junk
+http://example.com junk
!! end !!test @@ -19984,7 +20121,7 @@ http://example.comjunk!! html/php+tidy
junk!! html/parsoid -
junk+
junk!! end !! test @@ -20020,7 +20157,7 @@ parsoid=wt2html !! html/parsoid +" typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{"dir":""},"body":{"extsrc":""}}'> !! end !! test @@ -21049,7 +21186,7 @@ Handling of in URLs !! html/php !! html/parsoid - + !! end !! test @@ -21059,7 +21196,7 @@ Handling of %0A in URLs !! html/php !! html/parsoid - + !! end # The PHP parser strips the empty tags out for giggles; parsoid doesn't. @@ -21258,7 +21395,7 @@ image4 |300px| centre
(fr) ISBN 2753300917 example.com
!! html/parsoid -(fr) ISBN 2753300917 example.com
+(fr) ISBN 2753300917 example.com
!! end !! test @@ -22151,7 +22367,7 @@ Images with the "|" character in the comment !! html/phpNested: Hello Hong Kong!
!! html/parsoid -Nested: !
+Nested: !
!! end !! test @@ -23394,7 +23610,7 @@ language=zh variant=zh-cnA
!! html/parsoid -+
!! end !! test @@ -23407,7 +23623,7 @@ language=zh variant=zh-cn
A
!! html/parsoid -+
!! end # Parsoid and PHP disagree on how to parse this example: Parsoid @@ -23552,13 +23768,13 @@ gopher://www.google.com www.гоогле.Ñом !! html/parsoid -
http://www.google.com -gopher://www.google.com -http://www.google.com -gopher://www.google.com -irc://www.google.com -www.google.com/ftp://dir -www.google.com
+http://www.google.com +gopher://www.google.com +http://www.google.com +gopher://www.google.com +irc://www.google.com +www.google.com/ftp://dir +www.google.com
!! end !! test @@ -24245,7 +24461,7 @@ language=fa !! html/parsoid - + !! end !! test @@ -25625,7 +25841,7 @@ T36939 - Case insensitive link parsing ([HttP://]) !! html/parsoid - + !! end !!test @@ -25645,7 +25861,7 @@ HttP://MediaWiki.Org/ !! html/parsoid - + !! end !!test @@ -25779,6 +25995,17 @@ parsoid=wt2html,wt2wt[foo]
+!! wikitext +http://example.com -RFC 1234 -PMID 1234 -ISBN 123456789x
+http://example.com +RFC 1234 +PMID 1234 +ISBN 123456789x
!! end !! test @@ -29706,7 +30002,7 @@ Magic links inside image captions (autolinked) !! html/parsoid -hiho
+hiho
!! end !! test @@ -30152,7 +30448,7 @@ Use data-parsoid.firstWikitextNode to compute newline constraints for template c !! options parsoid=html2wt !! html/parsoid -ad |
test2 + test3 +
+!! wikitext +test2 +