X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=tests%2Fparser%2FparserTests.txt;h=e6fa203419adaabb0749817cf87c371ab1b57c1b;hp=6e9f9447d3d703531fcd54769711c067e133e19b;hb=74426f3cf796b149f1ae445e41815bbe148640b2;hpb=962529515d74517bd936bcb4546cecb5d28cdd91 diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index 6e9f9447d3..e6fa203419 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -546,15 +546,19 @@ Extra newlines between heading and content are swallowed Heading with line break in nowiki !! options parsoid=wt2html +!! config +wgFragmentMode=[ 'html5', 'legacy' ] !! wikitext == A B C == -!! html -

A B +!! html/php +

A B C[edit]

!! html/parsoid -

A B +

A B C

!! end @@ -4851,8 +4855,8 @@ parsoid=wt2html,wt2wt

!! html/parsoid

-

Bar

-

Bar

+

Bar

+

Bar

!! end !! test @@ -6715,9 +6719,9 @@ Don't break on | in extension attribute in template !! html/parsoid -

[1]

+

[1]

-
  1. ↑ ha
+
  1. ↑ ha
!! end ## We don't support roundtripping of these attributes in Parsoid. @@ -7825,13 +7829,15 @@ Link with multiple pipes !! test Anchor containing a #. (T65430) +!! config +wgFragmentMode=[ 'html5', 'legacy' ] !! wikitext [[Main Page#And#Link]] !! html/php -

Main Page#And#Link +

Main Page#And#Link

!! html/parsoid -

Main Page#And#Link

+

Main Page#And#Link

!! end !! test @@ -7949,13 +7955,27 @@ Link containing % as a double hex sequence interpreted to hex sequence ## Example for such a section: == < == !! test Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors +!! config +wgFragmentMode=[ 'html5', 'legacy' ] !! wikitext [[%23%3c]][[%23%3e]] !! html/php -

#<#> +

#<#>

!! html/parsoid -

#<#>

+

#<#>

+!! end + +## Example for such a section: == < == +!! test +Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors (legacy) +!! config +wgFragmentMode=[ 'legacy' ] +!! wikitext +[[%23%3c]][[%23%3e]] +!! html/php +

#<#> +

!! end !! test @@ -8017,7 +8037,7 @@ Link containing double quotes and spaces

Cool "Gator"

!! html/parsoid -

Cool "Gator"

+

Cool "Gator"

!! end !! test @@ -8025,7 +8045,7 @@ File containing double quotes and spaces !! wikitext [[File:Cool "Gator".png]] !! html/parsoid -

+

!! end !! test @@ -8073,7 +8093,7 @@ Link with double quotes in title part (literal) and alternate part (interpreted)

Pentecoste

!! html/parsoid -

+

''Pentecoste''

Pentecoste

Pentecoste

@@ -8093,10 +8113,10 @@ Broken image links with HTML captions (T41700) abc

!! html/parsoid -

- - -

+

+ + +

!! end !! test @@ -8600,13 +8620,26 @@ Parsoid: Scoped parsing should handle mixed transclusions and plain text !! test Link with angle bracket after anchor +!! config +wgFragmentMode=[ 'html5', 'legacy' ] !! wikitext [[Foo#]] !! html/php -

Foo#<bar> +

Foo#<bar>

!! html/parsoid -

Foo#<bar>

+

Foo#<bar>

+!! end + +!! test +Link with angle bracket after anchor (legacy) +!! config +wgFragmentMode=[ 'legacy' ] +!! wikitext +[[Foo#]] +!! html/php +

Foo#<bar> +

!! end ### @@ -8623,7 +8656,7 @@ parsoid=wt2html,wt2wt,html2html

MeatBall:SoftSecurity

!! html/parsoid -

MeatBall:SoftSecurity

+

MeatBall:SoftSecurity

!! end !! test @@ -8636,7 +8669,7 @@ parsoid=wt2html,wt2wt,html2html

MeatBall:

!! html/parsoid -

MeatBall:

+

MeatBall:

!! end ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia: @@ -8658,8 +8691,8 @@ parsoid=wt2html,wt2wt !! html/parsoid !! end @@ -8674,6 +8707,27 @@ Interwiki link with fragment (T4130) !! test Link scenarios with escaped fragments +!! config +wgFragmentMode=[ 'html5', 'legacy' ] +!! wikitext +[[#Is this great?]] +[[Foo#Is this great?]] +[[meatball:Foo#Is this great?]] +!! html/php +

#Is this great? +Foo#Is this great? +meatball:Foo#Is this great? +

+!! html/parsoid +

#Is this great? +Foo#Is this great? +meatball:Foo#Is this great?

+!! end + +!! test +Link scenarios with escaped fragments (legacy) +!! config +wgFragmentMode=[ 'legacy' ] !! wikitext [[#Is this great?]] [[Foo#Is this great?]] @@ -8683,10 +8737,6 @@ Link scenarios with escaped fragments Foo#Is this great? meatball:Foo#Is this great?

-!! html/parsoid -

#Is this great? -Foo#Is this great? -meatball:Foo#Is this great?

!! end # Ideally the wikipedia: prefix here should be proto-relative too @@ -8711,19 +8761,19 @@ Different interwiki prefixes mapping to the same URL [[ wikiPEdia :Foo]] !! html/parsoid -

en:Foo

+

en:Foo

-

Foo

+

Foo

-

wikipedia:Foo

+

wikipedia:Foo

-

Foo

+

Foo

-

wikipedia:en:Foo

+

wikipedia:en:Foo

-

wikipedia:en:Foo

+

wikipedia:en:Foo

-

wikiPEdia :Foo

+

wikiPEdia :Foo

!! end !! test @@ -8743,9 +8793,9 @@ Interwiki links that cannot be represented in wiki syntax is just fragment

!! html/parsoid -

meatball:ok -ok with fragment -ok ending with ? mark +

meatball:ok +ok with fragment +ok ending with ? mark has query is just fragment

!! end @@ -8758,7 +8808,7 @@ Interwiki links: trail

Bar

!! html/parsoid -

Bar

+

Bar

!! end !! test @@ -8812,7 +8862,7 @@ parsoid=wt2html,wt2wt,html2html

local:meatball:Hello

!! html/parsoid -

local:meatball:Hello

+

local:meatball:Hello

!! end !! test @@ -8910,8 +8960,8 @@ Blah blah blah

!! html/parsoid

Blah blah blah -es:Spanish - zh : Chinese

+es:Spanish + zh : Chinese

!! end !! test @@ -8928,7 +8978,7 @@ parsoid=wt2html [[:::es:Spanish]]

!! html/parsoid -

es:Spanish +

es:Spanish [[::es:Spanish]] [[:::es:Spanish]]

!! end @@ -9005,7 +9055,7 @@ parsoid=wt2html,wt2wt,html2html Blah blah blah [[zh:Chinese]] !! html/parsoid -

Blah blah blah zh:Chinese

+

Blah blah blah zh:Chinese

!! end ## PHP parser tests script needs an update @@ -9019,7 +9069,7 @@ parsoid=wt2html,wt2wt,html2html Blah blah blah [[zh:Chinese]] !! html/parsoid -

Blah blah blah zh:Chinese

+

Blah blah blah zh:Chinese

!! end !! test @@ -9106,7 +9156,7 @@ parsoid=wt2html,wt2wt,html2html

ko:

!! html/parsoid -

es:

+

es:

ko:

!! end @@ -9134,7 +9184,7 @@ Blah blah blah

!! html/parsoid

Blah blah blah -local:es:Spanish

+local:es:Spanish

!! end !! test @@ -9177,10 +9227,12 @@ Blah blah blah # This tests the Parsoid bail-out code. !! test 3. Other redirect variants +!! options +parsoid=wt2html !! wikitext #REDIRECT [[[[Bar]]]] !! html/parsoid -
  1. REDIRECT [[[[Bar]]]]
+
  1. REDIRECT [[[[Bar]]]]
!! end !! test @@ -11989,14 +12041,14 @@ some

here

!! html/parsoid -

hu

+

hu

some

  • stuff
  • here
-

here

+

here

!! end @@ -12520,6 +12572,8 @@ Preprocessor precedence 14: broken language converter in comment !! test Preprocessor precedence 15: broken brace markup in headings +!! config +wgFragmentMode=[ 'html5', 'legacy' ] !! options parsoid=wt2html !! wikitext @@ -12537,32 +12591,31 @@ __NOTOC__ __NOEDITSECTION__ ===6 foo-{bar 6=== 6 !! html/php+tidy -

1 foo[bar 1

+

1 foo[bar 1

1

-

2 foo[[bar 2

+

2 foo[[bar 2

2

-

3 foo{bar 3

+

3 foo{bar 3

3

-

4 foo{{bar 4

+

4 foo{{bar 4

4

-

5 foo{{{bar 5

+

5 foo{{{bar 5

5

-

6 foo-{bar 6

+

6 foo-{bar 6

6

!! html/parsoid - -

1 foo[bar 1

+ +

1 foo[bar 1

1

-

2 foo[[bar 2

+

2 foo[[bar 2

2

-

3 foo{bar 3

+

3 foo{bar 3

3

-

4 foo{{bar 4

+

4 foo{{bar 4

4

-

5 foo{{{bar 5

+

5 foo{{{bar 5

5

-

6 foo-{bar 6

+

6 foo-{bar 6

6

!! end @@ -12580,6 +12633,19 @@ parsoid=wt2html

!! end +!! test +Preprocessor precedence 17: template w/o target shouldn't prevent closing +!! options +parsoid=wt2html +!! wikitext +{{echo|hi {{}}}} +!! html/php +

hi {{}} +

+!! html/parsoid +

hi {{}}

+!! end + ### ### Token Stream Patcher tests ### @@ -14264,15 +14330,15 @@ parsoid=wt2html,wt2wt,html2html

Foobar.jpg

!! html/parsoid -

+

!! end !! test -Serialize simple image with figure-inline wrapper +Serialize simple image with span wrapper !! options parsoid=html2wt !! html/parsoid -

+

!! wikitext [[File:Foobar.jpg]] !! end @@ -14285,7 +14351,7 @@ Simple image (using File: namespace, now canonical)

Foobar.jpg

!! html/parsoid -

+

!! end !! test @@ -14402,7 +14468,7 @@ Linktrails should not work for images: [[File:Foobar.jpg]]s

Linktrails should not work for images: Foobar.jpgs

!! html/parsoid -

Linktrails should not work for images: s

+

Linktrails should not work for images: s

!! end !! test @@ -14448,7 +14514,7 @@ parsoid=wt2html,wt2wt,html2html

Foobar.jpg

!! html/parsoid -

+

!! end ## Parsoid does not provide editing support for images where templates produce multiple image attributes. @@ -14492,7 +14558,7 @@ thumbsize=220

456

!! html/parsoid -

123456

+

123456

123

456

123

456

!! end @@ -14516,7 +14582,7 @@ Image with multiple widths -- use last

caption

!! html/parsoid -

+

!! end !! test @@ -14533,7 +14599,7 @@ thumbsize=220

!! html/parsoid
caption
-

+

!! end !! test @@ -14566,7 +14632,7 @@ parsoid=wt2html,wt2wt,html2html Foobar.jpg

!! html/parsoid -

+

!! end !! test @@ -14577,7 +14643,7 @@ Image with link parameter, wiki target

Foobar.jpg

!! html/parsoid -

+

!! end # parsoid T51293 (part 1) @@ -14589,7 +14655,7 @@ Image with link parameter, URL target

Foobar.jpg

!! html/parsoid -

+

!! end # parsoid T51293 (part 2) @@ -14601,7 +14667,7 @@ Image with link parameter, protocol-less URL target

Foobar.jpg

!! html/parsoid -

+

!! end !! test @@ -14673,7 +14739,7 @@ Image with empty link parameter

Foobar.jpg

!! html/parsoid -

+

!! end !! test @@ -14684,7 +14750,7 @@ Image with link parameter (wiki target) and unnamed parameter

Title

!! html/parsoid -

+

!! end !! test @@ -14695,7 +14761,7 @@ Image with link parameter (URL target) and unnamed parameter

Title

!! html/parsoid -

+

!! end !! test @@ -14818,9 +14884,9 @@ Image with wiki markup in implicit alt

testing bold in alt

!! html/parsoid -

+

-

testing bold in alt

+

testing bold in alt

!! end !! test @@ -14913,9 +14979,9 @@ parsoid=wt2html,wt2wt,html2html

caption

!! html/parsoid -

-

-

+

+

+

!! end !! test @@ -14980,8 +15046,8 @@ parsoid=wt2html,wt2wt,html2html

Foobar.jpg

!! html/parsoid -

-

+

+

!! end !! test @@ -14997,8 +15063,8 @@ parsoid=wt2html,wt2wt,html2html

Foobar.jpg

!! html/parsoid -

-

+

+

!! end !! test @@ -15041,7 +15107,7 @@ parsoid=wt2html,wt2wt,html2html

Foobar.jpg

!! html/parsoid -

+

!! end !! test @@ -15057,8 +15123,8 @@ parsoid=wt2html,wt2wt,html2html

Foobar.svg

!! html/parsoid -

-

+

+

!! end !! test @@ -15116,7 +15182,7 @@ Frameless image caption with a free URL

http://example.com

!! html/parsoid -

+

!! end !! test @@ -15181,7 +15247,7 @@ parsoid=wt2html,wt2wt,html2html
lang=invalid:language:code
!! html/parsoid -
lang=invalid.language.code
+
lang=invalid:language:code
!! end !! test @@ -15226,7 +15292,7 @@ T2648: Frameless image caption with a link

text with a link in it

!! html/parsoid -

+

!! end !! test @@ -15237,7 +15303,7 @@ T2648: Frameless image caption with a link (suffix)

text with a linkfoo in it

!! html/parsoid -

+

!! end !! test @@ -15248,7 +15314,7 @@ T2648: Frameless image caption with an interwiki link

text with a MeatBall:Link in it

!! html/parsoid -

+

!! end !! test @@ -15259,7 +15325,7 @@ T2648: Frameless image caption with a piped interwiki link

text with a link in it

!! html/parsoid -

+

!! end !! test @@ -15267,7 +15333,7 @@ T107474: Frameless image caption with !! wikitext [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]] !! html/parsoid -

+

!! end !! test @@ -15278,7 +15344,7 @@ Escape HTML special chars in image alt text

& < > "

!! html/parsoid -

+

!! end !! test @@ -15291,7 +15357,7 @@ language=zh

& < > "

!! html/parsoid -

+

!! end !! test @@ -15302,7 +15368,7 @@ Entities in file name and attributes

7% solution

!! html/parsoid -

+

!! end !! test @@ -15313,7 +15379,7 @@ T2499: Alt text should have Ӓ, not &1234;

♀

!! html/parsoid -

+

!! end !! test @@ -15337,7 +15403,7 @@ Image caption containing another image
This is a caption with another image inside it!
!! html/parsoid -
This is a caption with another inside it!
+
This is a caption with another inside it!
!! end !! test @@ -15349,7 +15415,7 @@ Image: caption containing a newline

This *is some text

!! html/parsoid -

+

!!end !!test @@ -15410,7 +15476,7 @@ parsoid=wt2html,wt2wt,html2html

a

!! html/parsoid -

+

!! end !! test @@ -15464,7 +15530,7 @@ parsoid=wt2html,wt2wt,html2html

caption

!! html/parsoid -

+

!! end # Note that 'right' is the default alignment, despite the misspelled 'righ' below @@ -15517,7 +15583,7 @@ wgEnableUploads=0

File:Foobaz.jpg

!! html/parsoid -

+

!! end # Parsoid-specific testing for images @@ -15532,7 +15598,7 @@ Parsoid-specific image handling - simple image with size and middle alignment !! wikitext [[File:Foobar.jpg|middle|50px]] !! html/parsoid -

+

!! end !! test @@ -15543,7 +15609,7 @@ parsoid=wt2wt,wt2html,html2html !! wikitext [[Image:Foobar.jpg|middle|50px]] !! html/parsoid -

+

!! end !! test @@ -15552,7 +15618,7 @@ Parsoid-specific image handling - simple image with size and middle alignment !! wikitext [[File:Foobar.jpg|50px|middle]] !! html/parsoid -

+

!! end !! test @@ -15563,7 +15629,7 @@ parsoid=wt2html,wt2wt,html2html !! wikitext [[Image:Foobar.jpg|50px|middle]] !! html/parsoid -

+

!! end !! test @@ -15571,7 +15637,7 @@ Parsoid-specific image handling - simple image with both sizes, a baseline align !! wikitext [[File:Foobar.jpg|500x10px|baseline|caption]] !! html/parsoid -

+

!! end !! test @@ -15579,7 +15645,7 @@ Parsoid-specific image handling - simple image with border and size spec !! wikitext [[File:Foobar.jpg|50px|border|caption]] !! html/parsoid -

+

!! end !! test @@ -15643,7 +15709,7 @@ Parsoid-specific image handling - frameless image with specific size, border, an !! wikitext [[File:Foobar.jpg|frameless|442x50px|border|caption]] !! html/parsoid -

+

!! end !! test @@ -15651,7 +15717,7 @@ Parsoid-specific image handling - simple image with a formatted caption !! wikitext [[File:Foobar.jpg|
ab
c
]] !! html/parsoid -

+

!! end !! test @@ -15721,7 +15787,7 @@ foo bar !! html/parsoid

foo - + bar

!! end @@ -15745,7 +15811,7 @@ T93580: 2. inside inline images !! html/parsoid -

+

  1. ↑ foo
!! end @@ -15757,7 +15823,7 @@ T93580: 3. Templated inside inline images !! html/parsoid -

+

  1. ↑ foo
!! end @@ -16525,7 +16591,7 @@ Section headings with TOC Some text ===Another headline=== !! html -

Contents

+

Contents

  • 1 Headline 1
      @@ -16568,7 +16634,7 @@ __FORCETOC__ == Headline 2 == == Headline == !! html/php -

      Contents

      +

      Contents

      • 1 Headline 2
      • 2 Headline
      • @@ -16585,8 +16651,11 @@ __FORCETOC__ !! end # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10' +# Parsoid html2wt direction adds for level 7 and up. !! test Handling of sections up to level 6 and beyond +!! options +parsoid=wt2html !! wikitext = Level 1 Heading= == Level 2 Heading== @@ -16598,8 +16667,8 @@ Handling of sections up to level 6 and beyond ======== Level 8 Heading======== ========= Level 9 Heading========= ========== Level 10 Heading========== -!! html -

        Contents

        +!! html/php +

        Contents

        • 1 Level 1 Heading
            @@ -16640,6 +16709,17 @@ Handling of sections up to level 6 and beyond
            === Level 9 Heading===[edit]
            ==== Level 10 Heading====[edit]
            +!! html/parsoid +

            Level 1 Heading

            +

            Level 2 Heading

            +

            Level 3 Heading

            +

            Level 4 Heading

            +
            Level 5 Heading
            +
            Level 6 Heading
            +
            = Level 7 Heading=
            +
            == Level 8 Heading==
            +
            === Level 9 Heading===
            +
            ==== Level 10 Heading====
            !! end !! test @@ -16652,7 +16732,7 @@ TOC regression (T11764) == title 2 == === title 2.1 === !! html -

            Contents

            +

            Contents

            • 1 title 1
                @@ -16687,7 +16767,7 @@ TOC for heading containing (T96153) __FORCETOC__ ==New title== !! html/php -

                Contents

                +

                Contents

                @@ -16709,7 +16789,7 @@ wgMaxTocLevel=3 == title 2 == === title 2.1 === !! html -

                Contents

                +

                Contents

                • 1 title 1
                    @@ -16745,7 +16825,7 @@ wgMaxTocLevel=3 ====Section 1.1.1.1==== ==Section 2== !! html -

                    Contents

                    +

                    Contents

                    • 1 Section 1
                        @@ -16838,7 +16918,7 @@ __TOC__ === title 1.1 === == title 2 == !! html -

                        Contents

                        +

                        Contents

                        • 1 title 1
                            @@ -16863,24 +16943,33 @@ http://example.com [[File:Foobar.jpg]]

                            http://example.com Foobar.jpg

                            !! html/parsoid -

                            http://example.com

                            +

                            http://example.com

                            !!end +# Parsoid doesn't wt2wt this cleanly because it adds s. !! test Short headings with trailing space should match behavior of Parser::doHeadings (T21910) +!! options +parsoid=wt2html,html2html !! wikitext === The line above must have a trailing space! === But just in case it doesn't... -!! html +!! html/php

                            =[edit]

                            The line above must have a trailing space!

                            =[edit]

                            But just in case it doesn't...

                            +!! html/parsoid +

                            =

                            +

                            The line above must have a trailing space!

                            +

                            =

                            +

                            But just in case it doesn't...

                            !! end !! test @@ -16902,10 +16991,10 @@ section 4 == text " text == section 5 -!! html +!! html/php

                            The tooltips shall not show entities to the user (ie. be double escaped)

                            -

                            Contents

                            +

                            Contents

                            • 1 text > text
                            • 2 text < text
                            • @@ -16930,6 +17019,23 @@ section 5

                              text " text[edit]

                              section 5

                              +!! html/parsoid +

                              The tooltips shall not show entities to the user (ie. be double escaped)

                              + +

                              text > text

                              +

                              section 1

                              + +

                              text < text

                              +

                              section 2

                              + +

                              text & text

                              +

                              section 3

                              + +

                              text ' text

                              +

                              section 4

                              + +

                              text " text

                              +

                              section 5

                              !! end !! test @@ -16961,10 +17067,10 @@ section 6 [[#Plus-Entity+between+Text]] [[#Underscore_between_Text]] [[#Underscore-Entity_between_Text]] -!! html +!! html/php

                              Id should not contain + for spaces

                              -

                              Contents

                              +

                              Contents

                              • 1 Space between Text
                              • 2 Space-Entity between Text
                              • @@ -16999,18 +17105,48 @@ section 6 #Underscore_between_Text #Underscore-Entity_between_Text

                                +!! html/parsoid +

                                Id should not contain + for spaces

                                + +

                                Space between Text

                                +

                                section 1

                                + +

                                Space-Entity between Text

                                +

                                section 2

                                + +

                                Plus+between+Text

                                +

                                section 3

                                + +

                                Plus-Entity+between+Text

                                +

                                section 4

                                + +

                                Underscore_between_Text

                                +

                                section 5

                                + +

                                Underscore-Entity_between_Text

                                +

                                section 6

                                + +

                                #Space between Text +#Space-Entity between Text +#Plus+between+Text +#Plus-Entity+between+Text +#Underscore_between_Text +#Underscore-Entity_between_Text

                                !! end +# Parsoid html2wt disabled because it adds padding spaces around = !! test Headers with excess '=' characters (Are similar tests necessary beyond the 1st level?) +!! options +parsoid=wt2html,wt2wt,html2html !! wikitext =foo== ==foo= =''italic'' heading== ==''italic'' heading= -!! html -

                                Contents

                                +!! html/php +

                                Contents

                                • 1 foo=
                                • 2 =foo
                                • @@ -17024,6 +17160,11 @@ Headers with excess '=' characters

                                  italic heading=[edit]

                                  =italic heading[edit]

                                  +!! html/parsoid +

                                  foo=

                                  +

                                  =foo

                                  +

                                  italic heading=

                                  +

                                  =italic heading

                                  !! end !! test @@ -17039,8 +17180,8 @@ HTML headers vs TOC (T25393) == Header 2.1 == == Header 2.2 == __NOEDITSECTION__ -!! html -

                                  Contents

                                  +!! html/php +

                                  Contents

                                  • 1 Header 1
                                      @@ -17064,6 +17205,16 @@ __NOEDITSECTION__

                                      Header 2.1

                                      Header 2.2

                                      +!! html/parsoid +

                                      Header 1

                                      +

                                      Header 1.1

                                      +

                                      Header 1.2

                                      + +

                                      Header 2 +

                                      +

                                      Header 2.1

                                      +

                                      Header 2.2

                                      + !! end !! test @@ -17076,11 +17227,17 @@ parsoid=wt2html,wt2wt ==baz== -!! html -

                                      foo

                                      -

                                      bar

                                      -

                                      baz

                                      +!! html/php +

                                      foo[edit]

                                      +

                                      bar[edit]

                                      +

                                      baz[edit]

                                      +!! html/parsoid +

                                      foo

                                      +

                                      bar

                                      +

                                      baz

                                      !! end !! test @@ -17091,7 +17248,7 @@ http://example.com[[File:Foobar.jpg]]

                                      http://example.comFoobar.jpg

                                      !! html/parsoid -

                                      http://example.com

                                      +

                                      http://example.com

                                      !!end !! test @@ -17187,15 +17344,17 @@ parsoid=wt2html,html2html !! test div with multiple empty attribute values +!! config +wgFragmentMode=[ 'html5', 'legacy' ] !! options parsoid=wt2html,html2html !! wikitext
                                      HTML rocks
                                      !! html/php -
                                      HTML rocks
                                      +
                                      HTML rocks
                                      !! html/parsoid -
                                      HTML rocks
                                      +
                                      HTML rocks
                                      !! end !! test @@ -17521,7 +17680,7 @@ Image link to nonexistent file (T3850 - good)

                                      File:No such.jpg

                                      !! html/parsoid -

                                      +

                                      !! end !! test @@ -17773,9 +17932,11 @@ T4304: HTML attribute safety (unsafe breakout parameter 2; 2309) T4304: HTML attribute safety (link) !! wikitext
                                      -!! html +!! html/php
                                      +!! html/parsoid +
                                      !! end !! test @@ -17836,9 +17997,11 @@ T4304: HTML attribute safety (web link) T4304: HTML attribute safety (named web link) !! wikitext
                                      -!! html +!! html/php
                                      +!! html/parsoid +
                                      !! end !! test @@ -18447,13 +18610,26 @@ Table not started !! test Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id="" +!! config +wgFragmentMode=[ 'html5', 'legacy' ] !! wikitext byte[[#æ: v|backlink]] !! html/php -

                                      bytebacklink +

                                      bytebacklink

                                      !! html/parsoid -

                                      bytebacklink

                                      +

                                      bytebacklink

                                      +!! end + +!! test +Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id="" (legacy) +!! config +wgFragmentMode=[ 'legacy' ] +!! wikitext +byte[[#æ: v|backlink]] +!! html/php +

                                      bytebacklink +

                                      !! end # In HTML5, the restrictions are that id must contain at least one character, @@ -18516,6 +18692,37 @@ parsoid=wt2html,wt2wt

                                      2013

                                      !! end +!! test +Sanitizer: Avoid unnecessary percent encoded characters in interwiki links +!! wikitext +[[meatball:Soft"Security]] +!! html/php +

                                      meatball:Soft"Security +

                                      +!! html/parsoid +

                                      meatball:Soft"Security

                                      +!! end + +!! test +Sanitizer: angle brackets are invalid, even in interwiki links (T182338) +!! wikitext +[[meatball:FooBar]] +[[meatball:Foo<bar]] +[[meatball:Foo>bar]] +!! html/php +

                                      [[meatball:Foo<Bar]] +[[meatball:Foo>Bar]] +[[meatball:Foo<bar]] +[[meatball:Foo>bar]] +

                                      +!! html/parsoid +

                                      [[meatball:Foo<Bar]] +[[meatball:Foo>Bar]] +[[meatball:Foo<bar]] +[[meatball:Foo>bar]]

                                      +!! end + !! test Language converter: output gets cut off unexpectedly (T7757) !! options @@ -18549,10 +18756,14 @@ language=sr variant=sr-el -{H|foAjrjvi=>sr-el:" onload="alert(1)" data-foo="}- [[File:Foobar.jpg|alt=-{}-foAjrjvi-{}-]] -!! html +!! html/php

                                      " onload="alert(1)" data-foo="

                                      +!! html/parsoid +

                                      + +

                                      foAjrjvi

                                      !! end !! test @@ -18873,25 +19084,28 @@ Fuzz testing: Parser13 !! end +# Note that Parsoid output differs from the PHP parser here: the PHP +# parser breaks the URL for the magic word, while in Parsoid the URL +# production takes precedence. !! test Fuzz testing: Parser14 !! wikitext == onmouseover= == http://__TOC__ -!! html +!! html/php

                                      onmouseover=[edit]

                                      -http://

                                      Contents

                                      +http://

                                      Contents

                                      -!! html+tidy +!! html/php+tidy

                                      onmouseover=[edit]

                                      http://

                                      -
                                      +

                                      Contents

                                        @@ -18899,6 +19113,9 @@ http://

                                        Contents

                                      +!! html/parsoid +

                                      onmouseover=

                                      +

                                      http://__TOC__

                                      !! end !! test @@ -18922,7 +19139,7 @@ parsoid=wt2html,html2html !! html/parsoid -

                                      a

                                      +

                                      a

                                      !! end @@ -19097,15 +19314,45 @@ Fuzz testing: image with bogus manual thumbnail
                                      !! end +# Parsoid will emit the newline literally in wt2wt; see next test case. !! test Fuzz testing: encoded newline in generated HTML replacements (T8577) +!! options +parsoid=wt2html !! wikitext
                                      
                                       !! html/php
                                       
                                      
                                       
                                       !! html/parsoid
                                      -
                                      
                                      +
                                      
                                      +!! end
                                      +
                                      +!! test
                                      +Fuzz testing: encoded newline in generated HTML replacements, html2wt (T8577)
                                      +!! options
                                      +parsoid=html2wt
                                      +!! html/parsoid
                                      +
                                      
                                      +!! wikitext
                                      +
                                      
                                      +!! html/php
                                      +
                                      
                                      +
                                      +!! end
                                      +
                                      +!! test
                                      +Templates in extension attributes are not expanded
                                      +!! wikitext
                                      +
                                      
                                      +!! html/php
                                      +
                                      
                                      +
                                      +!! html/parsoid
                                      +
                                      
                                       !! end
                                       
                                       !! test
                                      @@ -20259,7 +20506,7 @@ File:File:Foobar.jpg
                                       
                                       !! html/parsoid
                                       
                                       !! end
                                       
                                      @@ -20322,12 +20569,12 @@ image4    |300px| centre
                                       
                                       !! html/parsoid
                                       
                                       !! end
                                       
                                      @@ -20385,11 +20632,11 @@ image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
                                       !! html/parsoid
                                       
                                       !! end
                                       
                                      @@ -20446,11 +20693,53 @@ image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
                                       !! html/parsoid
                                       
                                      +!! end
                                      +
                                      +!! test
                                      +Gallery (without px units)
                                      +!! wikitext
                                      +
                                      +File:Foobar.jpg
                                      +
                                      +!! html/php
                                      +
                                      +
                                      +!! html/parsoid
                                      +
                                      +!! end
                                      +
                                      +!! test
                                      +Gallery (with invalid units)
                                      +!! wikitext
                                      +
                                      +File:Foobar.jpg
                                      +
                                      +!! html/php
                                      +
                                      +
                                      +!! html/parsoid
                                      +
                                       !! end
                                       
                                      @@ -20490,9 +20779,9 @@ image:foobar.jpg|link=Main Page#section|caption
                                       
                                       !! html/parsoid
                                       
                                       !! end
                                       
                                      @@ -20522,7 +20811,7 @@ File:Foobar.jpg|{{echo|ho}}
                                       !! html/parsoid
                                       
                                       !! end
                                       
                                      @@ -20557,8 +20846,8 @@ File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}
                                       
                                       !! html/parsoid
                                       
                                       !! end
                                       
                                      @@ -20611,10 +20900,10 @@ some caption Main Page
                                       
                                       !! html/parsoid
                                       
                                       !! end
                                       
                                      @@ -20659,27 +20948,27 @@ foobar.jpg
                                       
                                       !! html/parsoid
                                       
                                       !! end
                                       
                                       !! test
                                      -Gallery override link with WikiLink (T36852)
                                      +Gallery override link with wikilink (T36852)
                                       !! options
                                       parsoid={
                                         "nativeGallery": true
                                       }
                                       !! wikitext
                                       
                                      -File:Foobar.jpg|alt=galleryalt|link=InterWikiLink
                                      +File:Foobar.jpg|alt=galleryalt|link=Wikilink
                                       
                                       !! html/php