From: jenkins-bot Date: Wed, 25 Jan 2017 19:08:23 +0000 (+0000) Subject: Merge "Update html/php clauses for subpage parserTests." X-Git-Tag: 1.31.0-rc.0~4230 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=90f0807c54370c05042632f77d2ffb846e8be628;hp=-c;p=lhc%2Fweb%2Fwiklou.git Merge "Update html/php clauses for subpage parserTests." --- 90f0807c54370c05042632f77d2ffb846e8be628 diff --combined tests/parser/parserTests.txt index cc202ac54f,6e93319615..1563525f94 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@@ -933,7 -933,6 +933,7 @@@ Italics and bold: 5-quote opening seque ### ### multiple quote sequences in a line ### + !! test Italics and bold: multiple quote sequences: (2,4,2) !! options @@@ -943,7 -942,8 +943,7 @@@ parsoid=wt2htm !! html/*

foo'bar

-!!end - +!! end # same html as previous, but wikitext adjusted to match parsoid html2wt !! test @@@ -955,6 -955,7 +955,6 @@@ Italics and bold: multiple quote sequen

!! end - !! test Italics and bold: multiple quote sequences: (2,4,3) !! options @@@ -964,7 -965,8 +964,7 @@@ parsoid=wt2htm !! html/*

foo'bar

-!!end - +!! end # same html as previous, but wikitext adjusted to match parsoid html2wt !! test @@@ -976,6 -978,7 +976,6 @@@ Italics and bold: multiple quote sequen

!! end - !! test Italics and bold: multiple quote sequences: (2,4,4) !! options @@@ -985,7 -988,8 +985,7 @@@ parsoid=wt2htm !! html/*

foo'bar'

-!!end - +!! end # same html as previous, but wikitext adjusted to match parsoid html2wt !! test @@@ -997,6 -1001,7 +997,6 @@@ Italics and bold: multiple quote sequen

!! end - # The PHP parser strips the empty tags out for giggles; parsoid doesn't. !! test Italics and bold: multiple quote sequences: (3,4,2) @@@ -1010,21 -1015,24 +1010,21 @@@ parsoid=wt2htm !! html/parsoid

foo'bar

-!!end +!! end # same html as previous, but wikitext adjusted to match parsoid html2wt !! test Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki -!! options -parsoid !! wikitext -'''foo''''bar'''' +'''foo''''bar'''' !! html/php

foo'bar

!! html/parsoid -

foo'bar +

foo'bar

!! end - # The PHP parser strips the empty tags out for giggles; parsoid doesn't. !! test Italics and bold: multiple quote sequences: (3,4,3) @@@ -1038,18 -1046,18 +1038,18 @@@ parsoid=wt2htm !! html/parsoid

foo'bar

-!!end +!! end # same html as previous, but wikitext adjusted to match parsoid html2wt !! test Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki !! wikitext -'''foo''''bar'''''' +'''foo''''bar'''''' !! html/php

foo'bar

!! html/parsoid -

foo'bar +

foo'bar

!! end @@@ -1127,7 -1135,7 +1127,7 @@@ The ''[[Main Page]]'''s talk page

The Main Page's talk page.

!! html/parsoid -

The Main Page's talk page.

+

The Main Page's talk page.

!! end !! test @@@ -2853,9 -2861,9 +2853,9 @@@ Parsoid: pipe in transclusion paramete !! html/php+tidy

http://foo.com/a%7Cb

!! html/parsoid -

http://foo.com/a|b

+data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"http://foo.com/a|b"}},"i":0}}]}'>http://foo.com/a%7Cb

!! end !! test @@@ -4790,17 -4798,6 +4790,17 @@@ news:'a'b''c''d

news:'a'bcd e

!! end +!! test +External links: with entity +!! wikitext +[http:// www.librarieswithoutborders.org Libraries without borders] +!! html/php +

Libraries without borders +

+!! html/parsoid +

Libraries without borders

+!! end + !! test External links: Lone protocols are never linked (T105697) !! wikitext @@@ -5463,7 -5460,7 +5463,7 @@@ http://example.com/index.php?foozoid&#x !! html/parsoid

http://example.com/index.php?foozoid%5B%5D=bar

-

http://example.com/index.php?foozoid[]=bar

+

http://example.com/index.php?foozoid%5B%5D=bar

!! end !! test @@@ -6410,7 -6407,7 +6410,7 @@@ parsoid=wt2html,html2htm !! html/parsoid -
" onmouseover="alert(document.cookie)">test
+[ftp://%7Cx]" onmouseover="alert(document.cookie)">test !! end !! test @@@ -7488,7 -7485,7 +7488,7 @@@ Piped link with multiple pipe character

|The|Main|Page|

!! html/parsoid -

|The|Main|Page|

+

|The|Main|Page|

!! end !! test @@@ -7844,17 -7841,6 +7844,17 @@@ Link containing double-single-quotes '

Lista d''e paise d''o munno

!! end +!! test +Link containing double quotes and spaces +!! wikitext +[[Cool "Gator"]] +!! html/php +

Cool "Gator" +

+!! html/parsoid +

Cool "Gator"

+!! end + !! test Link containing double-single-quotes '' in text (bug 4598 sanity check) !! wikitext @@@ -7863,7 -7849,7 +7863,7 @@@ Some [[Link|pretty ''italics'' and stuf

Some pretty italics and stuff!

!! html/parsoid -

Some pretty italics and stuff!

+

Some pretty italics and stuff!

!! end !! test @@@ -7893,9 -7879,9 +7893,9 @@@ Link with double quotes in title part (

!! html/parsoid

-

''Pentecoste''

-

Pentecoste

-

Pentecoste

+

''Pentecoste''

+

Pentecoste

+

Pentecoste

!! end !! test @@@ -7990,7 -7976,7 +7990,7 @@@ Piped link to URL: [[http://www.example

Piped link to URL: [example URL]

!! html/parsoid -

Piped link to URL: [example URL]

+

Piped link to URL: [example URL]

!! end !! test @@@ -8148,19 -8134,32 +8148,32 @@@ Link with multiple ":" in a subpage-sup Handle title parsing for subpages !! options title=[[/123123]] + subpage !! wikitext 123 + !! html/php +

123 +

!! html/parsoid

123

!! end - ## FIXME: Add a working php section here + !! article + User:Test/123 + !! text + test 123 + !! endarticle + !! test Link to a subpage from a namespace other than main !! options - title=[[User:test]] + title=[[User:Test]] + subpage !! wikitext [[/123]] + !! html/php +

/123 +

!! html/parsoid

/123

!! end @@@ -8182,7 -8181,8 +8195,8 @@@ parsoid=wt2htm !! test Purely hash wikilink !! options - title=[[User:test/123]] + title=[[User:Test/123]] + subpage !! wikitext [[#a|b]] !! html/php @@@ -8194,10 -8194,12 +8208,10 @@@ !! test 1. Interaction of linktrail and template encapsulation -!! options -parsoid !! wikitext {{echo|[[Foo]]}}l -!! html -

Fool

+!! html/parsoid +

Fool

!! end !! test @@@ -8267,7 -8269,7 +8281,7 @@@ Parsoid link trail escapin !! options parsoid=html2wt,html2html !! html/parsoid -

apples

+

apples

!! wikitext [[apple]]s !! end @@@ -8278,7 -8280,7 +8292,7 @@@ Parsoid link prefix escapin language=is parsoid=html2wt,html2html !! html/parsoid -

Aðrir mótmælendasöfnuður

+

Aðrir mótmælendasöfnuður

!! wikitext Aðrir mótmælenda[[söfnuður]] !! end @@@ -8303,10 -8305,12 +8317,10 @@@ Parsoid-centric test: Whitespace in ext !! test Parsoid: Scoped parsing should handle mixed transclusions and plain text -!! options -parsoid !! wikitext [[Foo|{{echo|a}} b {{echo|c}}]] -!! html -

a b c

+!! html/parsoid +

a b c

!! end !! test @@@ -8721,8 -8725,8 +8735,8 @@@ Parsoid bug 53221: Wikilinks should be !! options parsoid={ "modes": ["html2wt"], "suppressErrors": true } !! html/parsoid -

He llo He llo

-

He llo He llo

+

He llo He llo

+

He llo He llo

!! wikitext He llo [[Foo|He llo]] @@@ -10371,7 -10375,7 +10385,7 @@@ Parsoid: Page property magic word with !! wikitext {{DISPLAYTITLE:''{{PAGENAME}}''}} !! html/parsoid - + !! end !! test @@@ -13587,7 -13591,7 +13601,7 @@@ Image with link parameter, wiki targe

Foobar.jpg

!! html/parsoid -

+

!! end # parsoid bug 49293 (part 1) @@@ -13694,7 -13698,7 +13708,7 @@@ Image with link parameter (wiki target

Title

!! html/parsoid -

+

!! end !! test @@@ -13746,7 -13750,7 +13760,7 @@@ parsoid=wt2html,wt2wt,html2htm
Title
!! html/parsoid -
Title
+
Title
!! end !! test @@@ -13788,7 -13792,7 +13802,7 @@@ parsoid=wt2html,wt2wt,html2htm
alttext
Title
!! html/parsoid -
alttext
Title
+
alttext
Title
!! end !! test @@@ -13801,7 -13805,7 +13815,7 @@@ parsoid=wt2html,wt2wt,html2htm
This is a test image Main Page
!! html/parsoid -
This is a test image Main Page
+
This is a test image Main Page
!! end !! test @@@ -13814,7 -13818,7 +13828,7 @@@ parsoid=wt2html,wt2wt,html2htm
Altitude
This is a test image Main Page
!! html/parsoid -
Altitude
This is a test image Main Page
+
Altitude
This is a test image Main Page
!! end !! test @@@ -14278,7 -14282,7 +14292,7 @@@ parsoid=wt2html,wt2wt,html2htm

[[Image:Foobar.jpg|thumb|This is a broken caption. But this is just an ordinary link.

!! html/parsoid -

[[Image:Foobar.jpg|thumb|This is a broken caption. But this is just an ordinary link.

+

[[Image:Foobar.jpg|thumb|This is a broken caption. But this is just an ordinary link.

!! end !! test @@@ -14391,7 -14395,7 +14405,7 @@@ language=e
caption
!! html/parsoid -
caption
+
caption
!! end !! test @@@ -14765,8 -14769,8 +14779,8 @@@ subpage title=[[Subpage test/1/2/3/4]

Subpage test/1/2/subpage

!! html/parsoid -

subpage

-

Subpage_test/1/2/subpage

+

subpage

+

Subpage_test/1/2/subpage

!! end !! test @@@ -15056,12 -15060,12 +15070,12 @@@ Ba Bar

!! html/parsoid -

Foo Bar

-

Foo Bar

-

Foo Bar

-

Foo Bar

-

Foo Bar

- +

Foo Bar

+

Foo Bar

+

Foo Bar

+

Foo Bar

+

Foo Bar

+ !! end ## We used to, but no longer wt2wt this test since the default serializer @@@ -16093,7 -16097,7 +16107,7 @@@ div with braces in attribute valu !! wikitext
Foo
!! html/php -
Foo
+
Foo
!! html/parsoid
Foo
@@@ -16533,11 -16537,9 +16547,11 @@@ Template:Div styl Bug 2304: HTML attribute safety (safe template; regression bug 2309) !! wikitext
-!! html +!! html/php
+!! html/parsoid +
!! end # Parsoid has enough context to handle this case @@@ -16556,36 -16558,29 +16570,36 @@@ Bug 2304: HTML attribute safety (danger Bug 2304: HTML attribute safety (dangerous style template; 2309) !! wikitext
-!! html +!! html/php
+!! html/parsoid +
!! end !! test Bug 2304: HTML attribute safety (safe parameter; 2309) !! wikitext {{div style|width: 200px}} -!! html +!! html/php
Magic div
+!! html/parsoid +
Magic div
!! end !! test Bug 2304: HTML attribute safety (unsafe parameter; 2309) !! wikitext {{div style|width: expression(alert(document.cookie))}} -!! html +!! html/php
Magic div
+!! html/parsoid +
Magic div
!! end +## Parsoid output here differs; needs investigation. !! test Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309) !! wikitext @@@ -16595,7 -16590,6 +16609,7 @@@ !! end +## Parsoid output here differs; needs investigation. !! test Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309) !! wikitext @@@ -16632,6 -16626,7 +16646,6 @@@ Bug 2304: HTML attribute safety (bold !! end - !! test Bug 2304: HTML attribute safety (ISBN) !! wikitext @@@ -16681,22 -16676,18 +16695,22 @@@ Bug 2304: HTML attribute safety (named Bug 3244: HTML attribute safety (extension; safe) !! wikitext
-!! html +!! html/php
+!! html/parsoid +
!! end !! test Bug 3244: HTML attribute safety (extension; unsafe) !! wikitext
-!! html +!! html/php
+!! html/parsoid +
!! end # More MSIE fun discovered by Tom Gilder @@@ -16705,55 -16696,45 +16719,55 @@@ MSIE CSS safety test: spurious slash !! wikitext
evil
-!! html +!! html/php
evil
+!! html/parsoid +
evil
!! end !! test MSIE CSS safety test: hex code !! wikitext
evil
-!! html +!! html/php
evil
+!! html/parsoid +
evil
!! end !! test MSIE CSS safety test: comment in url !! wikitext
evil
-!! html +!! html/php
evil
+!! html/parsoid +
evil
!! end !! test MSIE CSS safety test: comment in expression !! wikitext
evil4
-!! html +!! html/php
evil4
+!! html/parsoid +
evil4
!! end !! test CSS safety test (all browsers): vertical tab (bug 55332 / CVE-2013-4567) !! wikitext

A

-!! html +!! html/php

A

+!! html/parsoid +

A

!! end !! test @@@ -16761,13 -16742,10 +16775,13 @@@ MSIE 6 CSS safety test: Fullwidth (bug !! wikitext

A

B
-!! html +!! html/php

A

B
+!! html/parsoid +

A

+
B
!! end !! test @@@ -16775,13 -16753,10 +16789,13 @@@ MSIE 6 CSS safety test: IPA extensions !! wikitext
A

B

-!! html +!! html/php
A

B

+!! html/parsoid +
A
+

B

!! end !! test @@@ -16790,30 -16765,23 +16804,30 @@@ MSIE 6 CSS safety test: sup/sub script
A
B

C

-!! html +!! html/php
A
B

C

+!! html/parsoid +
A
+
B
+

C

!! end -# FIXME: Parsoid fails to sanitize this! See T58846. !! test Opera -o-link CSS +!! options +parsoid=wt2html,html2html !! wikitext
X
-!! html +!! html/php
X
+!! html/parsoid +
X
!! end !! test @@@ -16826,7 -16794,7 +16840,7 @@@ MSIE 6 CSS safety test: Repetition mark

E

F

G

-!! html +!! html/php

A

B

C

@@@ -16835,14 -16803,6 +16849,14 @@@

F

G

+!! html/parsoid +

A

+

B

+

C

+

D

+

E

+

F

+

G

!! end !! test @@@ -16906,6 -16866,7 +16920,6 @@@ Expansion of multi-line templates in at !! end - !! test Expansion of multi-line templates in attribute values (bug 6255 sanity check) !! wikitext @@@ -16939,7 -16900,6 +16953,7 @@@ Tags which are hidden from Tidy cannot ### ### Parser hooks (see tests/parser/parserTestsParserHook.php for the extension) ### + !! test Parser hook: empty input !! wikitext @@@ -18910,6 -18870,7 +18924,6 @@@ stuf xxx !! end - !! test Handling of in URLs !! wikitext @@@ -18918,7 -18879,9 +18932,7 @@@ !! html/parsoid - + !! end !! test @@@ -18932,6 -18895,7 +18946,6 @@@ Handling of %0A in URL !! end - # The PHP parser strips the empty tags out for giggles; parsoid doesn't. !! test 5 quotes, code coverage +1 line @@@ -19502,27 -19466,6 +19516,27 @@@ File:Foobar.jpg|alt=galleryalt|link=htt !! end +!! test +Gallery override link with absolute external link with LanguageConverter +!! options +language=zh +!! input + +File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org + +!! result + + +!! end + !! test Gallery override link with malicious javascript (T36852) !! options @@@ -19545,7 -19488,7 +19559,7 @@@ File:Foobar.jpg|alt=galleryalt|link=" o !! html/parsoid !! end @@@ -19575,24 -19518,6 +19589,24 @@@ File:Foobar.jpg|link= !! end +!! test +Serialize gallery without attrs in data-mw +!! options +parsoid={ + "modes": ["html2wt"], + "nativeGallery": true +} +!! html/parsoid + +!! wikitext + +File:Test.png + +!! end + !! test HTML Hex character encoding (spells the word "JavaScript") !! options @@@ -19876,6 -19801,7 +19890,6 @@@ dt/dd/dl tes !!end - # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "" tag. !! test Images with the "|" character in the comment @@@ -19885,7 -19811,7 +19899,7 @@@
An external URL
!! html/parsoid -
An external URL
+
An external URL
!! end !! test @@@ -20437,8 -20363,8 +20451,8 @@@ parsoid=wt2htm !! html/php cat=分类 sort= !! html/parsoid -

A

- +

A

+ !! end !! test @@@ -20713,28 -20639,6 +20727,28 @@@ Nested: -{zh-hans:Hi -{zh-cn:China;zh-s # Since Parsoid is starting to emit canonical wikitext for links, # [http://example.com http://example.com] will not RT back to that # form anymore. +!! test +HTML markups with conversion syntax in attribs, nested in other conversion blocks +!! options +language=zh variant=zh-cn +!! wikitext +-{zh;zh-hans;zh-hant|A}- +!! html +

A +

+!! end + +!! test +HTML markups with conversion syntax in attribs, nested in other conversion blocks (not working yet) +!! options +language=zh variant=zh-cn disabled +!! wikitext +-{A}- +!! html +

A +

+!! end + !! test Proper conversion of text in external links !! options @@@ -22494,6 -22398,82 +22508,6 @@@ File:foobar.jpg|caption|alt=galleryalt| !! end -!!test -Gallery override link with absolute external link (bug 34852) -!! wikitext - -File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org - -!! html - - -!! end - -!! test -Gallery override link with absolute external link with LanguageConverter -!! options -language=zh -!! input - -File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org - -!! result - - -!! end - -!!test -Gallery override link with malicious javascript (bug 34852) -!! wikitext - -File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!'); - -!! html - - -!! end - -!!test -Gallery with invalid title as link (bug 43964) -!! wikitext - -File:foobar.jpg|link=< - -!! html - - -!! end - !!test Language parser function !! wikitext @@@ -22755,7 -22735,7 +22769,7 @@@ A A [1]

    -
  1. ↑ This is a bolded link and this is a transclusion +
  2. ↑ This is a bolded link and this is a transclusion
!!end