From 438c66d913837ab3c78edce96e96a01106057a24 Mon Sep 17 00:00:00 2001 From: "C. Scott Ananian" Date: Tue, 12 Dec 2017 17:52:02 -0500 Subject: [PATCH] Sync up with Parsoid parserTests.txt This now aligns with Parsoid commit 741fc5dc0f683df8d81bc09843734dad966138bd Change-Id: I5a40b9410bbf421e22e37063785446db25e7af42 --- tests/parser/parserTests.txt | 936 ++++++++++++++++++++++++++--------- 1 file changed, 700 insertions(+), 236 deletions(-) diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index 7af3a3655b..72ee550109 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 @@ -14264,15 +14317,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 +14338,7 @@ Simple image (using File: namespace, now canonical)

Foobar.jpg

!! html/parsoid -

+

!! end !! test @@ -14402,7 +14455,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 +14501,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 +14545,7 @@ thumbsize=220

456

!! html/parsoid -

123456

+

123456

123

456

123

456

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

caption

!! html/parsoid -

+

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

!! html/parsoid
caption
-

+

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

!! html/parsoid -

+

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

Foobar.jpg

!! html/parsoid -

+

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

Foobar.jpg

!! html/parsoid -

+

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

Foobar.jpg

!! html/parsoid -

+

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

Foobar.jpg

!! html/parsoid -

+

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

Title

!! html/parsoid -

+

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

Title

!! html/parsoid -

+

!! end !! test @@ -14818,9 +14871,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 +14966,9 @@ parsoid=wt2html,wt2wt,html2html

caption

!! html/parsoid -

-

-

+

+

+

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

Foobar.jpg

!! html/parsoid -

-

+

+

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

Foobar.jpg

!! html/parsoid -

-

+

+

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

Foobar.jpg

!! html/parsoid -

+

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

Foobar.svg

!! html/parsoid -

-

+

+

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

http://example.com

!! html/parsoid -

+

!! end !! test @@ -15226,7 +15279,7 @@ T2648: Frameless image caption with a link

text with a link in it

!! html/parsoid -

+

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

text with a linkfoo in it

!! html/parsoid -

+

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

text with a MeatBall:Link in it

!! html/parsoid -

+

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

text with a link in it

!! html/parsoid -

+

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

+

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

& < > "

!! html/parsoid -

+

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

& < > "

!! html/parsoid -

+

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

7% solution

!! html/parsoid -

+

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

♀

!! html/parsoid -

+

!! end !! test @@ -15337,7 +15390,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 +15402,7 @@ Image: caption containing a newline

This *is some text

!! html/parsoid -

+

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

a

!! html/parsoid -

+

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

caption

!! html/parsoid -

+

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

File:Foobaz.jpg

!! html/parsoid -

+

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

+

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

+

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

+

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

+

!! end !! test @@ -15571,7 +15624,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 +15632,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 +15696,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 +15704,7 @@ Parsoid-specific image handling - simple image with a formatted caption !! wikitext [[File:Foobar.jpg|
ab
c
]] !! html/parsoid -

+

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

foo - + bar

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

+

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

+

  1. ↑ foo
!! end @@ -16585,8 +16638,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,7 +16654,7 @@ Handling of sections up to level 6 and beyond ======== Level 8 Heading======== ========= Level 9 Heading========= ========== Level 10 Heading========== -!! html +!! html/php

Contents

  • 1 Level 1 Heading @@ -16640,6 +16696,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 @@ -16863,24 +16930,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,7 +16978,7 @@ section 4 == text " text == section 5 -!! html +!! html/php

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

    Contents

    @@ -16930,6 +17006,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,7 +17054,7 @@ section 6 [[#Plus-Entity+between+Text]] [[#Underscore_between_Text]] [[#Underscore-Entity_between_Text]] -!! html +!! html/php

    Id should not contain + for spaces

    Contents

    @@ -16999,17 +17092,47 @@ 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 +!! html/php

    Contents

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

      italic heading=[edit]

      =italic heading[edit]

      +!! html/parsoid +

      foo=

      +

      =foo

      +

      italic heading=

      +

      =italic heading

      !! end !! test @@ -17039,7 +17167,7 @@ HTML headers vs TOC (T25393) == Header 2.1 == == Header 2.2 == __NOEDITSECTION__ -!! html +!! html/php

      Contents

      • 1 Header 1 @@ -17064,6 +17192,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 +17214,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 +17235,7 @@ http://example.com[[File:Foobar.jpg]]

        http://example.comFoobar.jpg

        !! html/parsoid -

        http://example.com

        +

        http://example.com

        !!end !! test @@ -17187,15 +17331,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 +17667,7 @@ Image link to nonexistent file (T3850 - good)

        File:No such.jpg

        !! html/parsoid -

        +

        !! end !! test @@ -17773,9 +17919,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 +17984,11 @@ T4304: HTML attribute safety (web link) T4304: HTML attribute safety (named web link) !! wikitext
        -!! html +!! html/php
        +!! html/parsoid +
        !! end !! test @@ -18447,13 +18597,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 +18679,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 @@ -18877,12 +19071,15 @@ 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

          @@ -18891,7 +19088,7 @@ http://

          Contents

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

          onmouseover=[edit]

          http://

          @@ -18903,6 +19100,9 @@ http://

          Contents

        +!! html/parsoid +

        onmouseover=

        +

        http://__TOC__

        !! end !! test @@ -18926,7 +19126,7 @@ parsoid=wt2html,html2html !! html/parsoid -

        a

        +

        a

        !! end @@ -19101,15 +19301,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
        @@ -20263,7 +20493,7 @@ File:File:Foobar.jpg
         
         !! html/parsoid
         
         !! end
         
        @@ -20326,12 +20556,12 @@ image4    |300px| centre
         
         !! html/parsoid
         
         !! end
         
        @@ -20389,11 +20619,11 @@ image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
         !! html/parsoid
         
         !! end
         
        @@ -20450,11 +20680,11 @@ image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
         !! html/parsoid
         
         !! end
         
        @@ -20494,9 +20724,9 @@ image:foobar.jpg|link=Main Page#section|caption
         
         !! html/parsoid
         
         !! end
         
        @@ -20526,7 +20756,7 @@ File:Foobar.jpg|{{echo|ho}}
         !! html/parsoid
         
         !! end
         
        @@ -20561,8 +20791,8 @@ File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}
         
         !! html/parsoid
         
         !! end
         
        @@ -20615,10 +20845,10 @@ some caption Main Page
         
         !! html/parsoid
         
         !! end
         
        @@ -20663,27 +20893,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
         
         
         !! html/parsoid
        -