X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/ajouter.php?a=blobdiff_plain;f=tests%2Fparser%2FparserTests.txt;h=ff574d153c1c0bb0b7385e8c1d3fb53aa2a958aa;hb=1b13888ed6bd09731f10045650714a3392bb55df;hp=97bff348ee4a689d37c9bd70c8970082fd9b5e11;hpb=66216b12ee2c22468cce8c2f4751696b78fa5d74;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index 97bff348ee..ff574d153c 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -109,6 +109,13 @@ Template:echo {{{1}}} !! endarticle +// For Serbian; localize Template namespace +!! article +Шаблон:Echo +!! text +{{{1}}} +!! endarticle + !! article Template:echo_with_span !! text @@ -278,6 +285,12 @@ Template:CircularRef {{CircularRef}} !! endarticle +!! article +Template:With: Colon +!! text +Template with colon +!! endarticle + ### ### Basic tests ### @@ -294,7 +307,7 @@ CircularRef !! html/parsoid

[1]

-
  1. ↑ Error: Expansion loop detected at Template:CircularRef
+
  1. ↑ Error: Expansion loop detected at Template:CircularRef
!! end !! test @@ -1855,6 +1868,19 @@ parsoid=wt2html,wt2wt !! end +## Make sure ">" gets escaped in comments to avoid XSS +!! test +IE conditional comments +!! wikitext + +!! html/parsoid + +!! end + ### ### paragraph wrapping tests ### @@ -1886,6 +1912,33 @@ a
foo

b

!! end +!! test +No p-wrappable content +!! wikitext +
x
+
x
+
x
+!! html+tidy +
x
+
x
+
x
+!! html/parsoid +
x
+
x
+
x
+!! end + +# T177612: Parsoid-only test +!! test +Transclusion meta tags shouldn't trip Parsoid's useless p-wrapper stripping code +!! wikitext +{{echo|
x
}} +x +!! html/parsoid +
x
+

x

+!! end + !! test Block tag on one line (
) !! wikitext @@ -2423,7 +2476,7 @@ Block tag pre foo !! html/parsoid -

foo

+

foo

!! end !!test @@ -2818,7 +2871,7 @@ Templates: Handle comments in the target

foo

foo

-!!end +!! end !! test Templates: Handle comments in parameter names (T69657) @@ -2848,7 +2901,7 @@ Templates: Handle comments in parameter names (T69657)

foo

foo

-!!end +!! end !! test Templates: Other wikitext in parameter names (T69657) @@ -2859,11 +2912,23 @@ Templates: Other wikitext in parameter names (T69657)

!! html/parsoid

{{{1}}}

-!!end +!! end + +!! test +Templates: With colons +!! wikitext +{{With: Colon}} +!! html/php +

Template with colon +

+!! html/parsoid +

Template with colon

+!! end #-------------------------------------------------------------------- # Transclusion parameter escaping tests #-------------------------------------------------------------------- + !! test Templates: Parsoid parameter escaping test 1 !! wikitext @@ -4294,6 +4359,21 @@ Definition Lists: Mixed Lists: Test 10 !! end +# This is a regression test for T175099 +# html/php+tidy is insufficient since Tidy covers up the bug. +# But once Tidy is replaced with RemexHTML, html/php+tidy is good enough +!! test +Definition Lists: Mixed Lists: Test 11 +!! wikitext +; a +:* b +!! html/* +
a
+
+
  • b
+ +!! end + # The Parsoid team disagrees with the PHP parser's seemingly-random # rules regarding dd/dt on the next two tests. Parsoid is more # consistent, and recognizes the shared nesting and keeps the @@ -4301,7 +4381,7 @@ Definition Lists: Mixed Lists: Test 10 # (And tidy again converts
to
before 'bar'.) !! test -Definition Lists: Mixed Lists: Test 11 +Definition Lists: Mixed Lists: Test 12 !! wikitext *#*#;*;;foo :bar *#*#;boo :baz @@ -4753,8 +4833,11 @@ foo//example.com/Foo

!! end +## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia: !! test External links: with no contents +!! options +parsoid=wt2html,wt2wt !! wikitext [http://en.wikipedia.org/wiki/Foo] @@ -4858,7 +4941,7 @@ External links: Free with trailing quotes (T113666) news:'a'b''c''d e !! html/php

News: Stuff here -

news:'a'bcd e +

news:'a'bcd e

!! html/parsoid

News: Stuff here

@@ -5504,8 +5587,8 @@ External link containing a single quote. (T65947) [//foo.org/bar'baz bang] !! html/php -

[1] -

bang +

[1] +

bang

!! html/parsoid

@@ -5882,11 +5965,11 @@ parsoid=html2wt !! wikitext [[Foo|Bar]] [[Foo|Bar]] -[[wikipedia:Foo|Bar]] -[[wikipedia:Foo|Bar]] +[[:en:Foo|Bar]] +[[:en:Foo|Bar]] -[[wikipedia:European_Robin|European Robin]] -[[wikipedia:European_Robin|European Robin]] +[[:en:European_Robin|European Robin]] +[[:en:European_Robin|European Robin]] !! end !! test @@ -6634,7 +6717,7 @@ Don't break on | in extension attribute in template !! html/parsoid

[1]

-
  1. ↑ ha
+
  1. ↑ ha
!! end ## We don't support roundtripping of these attributes in Parsoid. @@ -6809,7 +6892,7 @@ T107652: s in templates that also generate table cell attributes should be
Foo[1]
-
  1. ↑ foo
+
  1. ↑ foo
!! end !! test @@ -7269,8 +7352,8 @@ parsoid=wt2html !! html - - + +
!! end @@ -7719,13 +7802,16 @@ Piped link with extlink-like text !! wikitext [[Main Page|[bar]]] [[Main Page|This is a [bar]]] +[[Main Page|[bar]] !! html/php

[bar] This is a [bar] +[bar

!! html/parsoid

[bar] -This is a [bar]

+This is a [bar] +[bar

!! end !! test @@ -7917,7 +8003,7 @@ Link containing double-single-quotes '' (T6598) !! wikitext [[Lista d''e paise d''o munno]] !! html/php -

Lista d''e paise d''o munno +

Lista d''e paise d''o munno

!! html/parsoid

Lista d''e paise d''o munno

@@ -7982,9 +8068,9 @@ Link with double quotes in title part (literal) and alternate part (interpreted) [[''Pentecoste''|''Pentecoste'']] !! html/php

File:Denys Savchenko Pentecoste.jpg -

''Pentecoste'' -

Pentecoste -

Pentecoste +

''Pentecoste'' +

Pentecoste +

Pentecoste

!! html/parsoid

@@ -8065,7 +8151,6 @@ Plain link to page with question mark in title

!! end - # I'm fairly sure the expected result here is wrong. # We want these to be URL links, not pseudo-pages with URLs for titles.... # However the current output is also pretty screwy. @@ -8088,6 +8173,34 @@ Piped link to URL: [[http://www.example.com|an example URL]]

Piped link to URL: [example URL]

!! end +!! test +Plain link in template argument +!! options +parsoid=wt2html +!! wikitext +{{echo|[http://www.example.com |123]}} + +{{echo|[[http://www.example.com |123]]}} + +{{echo|[[http://www.example.com |123]}} + +{{echo|[http://www.example.com |123]]}} +!! html/php +

[http://www.example.com +

[|123] +

{{echo|[|123}} +

[http://www.example.com +

+!! html/parsoid +

[http://www.example.com

+ +

[|123]

+ +

{{echo|[|123}}

+ +

[http://www.example.com

+!! end + !! test T2002: [[page|http://url/]] should link to page, not http://url/ !! wikitext @@ -8172,6 +8285,33 @@ Non-breaking spaces in title

!!end +# Add new article for the test below so that it doesn't red-link +!! article +Foo bar baz +!! text +boo +!! endarticle + +!! test +Multiple spaces in titles should normalize to a single underscore +!! options +parsoid=wt2html,wt2wt +!! wikitext +[[Foo bar baz|x]] +[[Foo bar baz|x]] +[[Foo bar baz|x]] +!! html/php +

x +x +x +

+!! html/parsoid +

x +x +x +

+!! end + !! test Internal link with ca linktrail, surrounded by bold apostrophes (T29473 primary issue) !! options @@ -8223,7 +8363,7 @@ language=kaa !! wikitext [[Something]]'nice !! html -

Something'nice +

Something'nice

!! end @@ -8407,6 +8547,31 @@ parsoid=html2wt,html2html Aðrir mótmælenda[[söfnuður]] !! end +!! test +Parsoid link bracket escaping +!! options +parsoid=html2wt,html2html +!! html/parsoid +

Test

+

[Test]

+

[[Test]]

+

[[[Test]]]

+

[[[[Test]]]]

+

[[[[[Test]]]]]

+!! wikitext +[[Test]] + +[[[Test]]] + +[[[[Test]]]] + +[[[[[Test]]]]] + +[[[[[[Test]]]]]] + +[[[[[[[Test]]]]]]] +!! end + !! test Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved !! wikitext @@ -8474,8 +8639,11 @@ parsoid=wt2html,wt2wt,html2html

MeatBall:

!! end +## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia: !! test Interwiki link encoding conversion (T3636) +!! options +parsoid=wt2html,wt2wt !! wikitext *[[Wikipedia:ro:Olteniţa]] *[[Wikipedia:ro:Olteniţa]] @@ -8488,6 +8656,11 @@ Interwiki link encoding conversion (T3636)
  • Wikipedia:ro:OlteniÅ£a
  • Wikipedia:ro:OlteniÅ£a
  • +!! html/parsoid + !! end !! test @@ -8741,6 +8914,25 @@ Blah blah blah zh : Chinese

    !! end +!! test +Multiple colons escaping interlanguage links +!! options +parsoid=wt2html +!! wikitext +[[:es:Spanish]] +[[::es:Spanish]] +[[:::es:Spanish]] +!! html/php +

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

    +!! html/parsoid +

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

    +!! end + ## parsoid html2wt will normalize the space to _ !! test Space and question mark encoding in interlanguage links (T95473) @@ -9142,8 +9334,6 @@ some text
    1. redirect Main Page
    !! end -# FIXME: Should hoist the redirect to the top of the page and ensure there -# is only one. !! test New redirect !! options @@ -9151,7 +9341,53 @@ parsoid=html2wt !! html/parsoid

    Foo

    !! wikitext +#REDIRECT [[Foo]] Foo +!! end + +!! test +Redirect followed by block on the same line +!! options +parsoid=wt2html +!! wikitext +#REDIRECT [[Main Page]]== hi == +!! html/parsoid +

    hi

    +!! end + +!! test +Redirect followed by a newline +!! wikitext +#REDIRECT [[Main Page]] +A newline +!! html/parsoid + +

    A newline

    +!! end + +!! test +Redirect followed by multiple newlines +!! wikitext +#REDIRECT [[Main Page]] + + +A newline +!! html/parsoid + + +


    +A newline

    +!! end + +!! test +Drop duplicate redirects +!! options +parsoid=html2wt +!! html/parsoid + + + +!! wikitext #REDIRECT [[Foo]] !! end @@ -9238,7 +9474,7 @@ Handling html with a div self-closing tag !! html/parsoid
    -
    +
    @@ -9533,7 +9769,7 @@ parsoid !! wikitext * !! html/parsoid -
      +
        !! end !! test @@ -9703,6 +9939,17 @@ parsoid=wt2html,wt2wt
        • not a li-hack
        +!! html/parsoid +
        • foo
        • +
        • li-hack
        • +
        • templated li-hack
        • +
        • unsupported li-hack with preceding comments
        + +
          +
        • not a li-hack +
        • +
        + !!end !! test @@ -9738,9 +9985,9 @@ Parsoid: Test of whitespace serialization with Templated bullets parsoid !! wikitext * {{bullet}} -!! html +!! html/parsoid
          -
        • Bar
        • +
        • Bar
        !! end @@ -10421,11 +10668,13 @@ parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true } Magic Word: {{REVISIONID}} !! options parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true } +showflags !! wikitext {{REVISIONID}} !! html/*

        1337

        +flags=vary-revision-id !! end !! test @@ -11138,6 +11387,15 @@ Templates with templated name
        • item 1
        !! end +## Regression test; the output here isn't really that interesting. +!! test +Templates with templated name and top level template args +!! wikitext +{{1{{2{{{3}}}|4=5}}}} +!! html/parsoid +

        {{1{{2{{{3}}}|4=5}}}}

        +!! end + # Parsoid markup is deliberate "broken". This is an edge case. # See long comment in TemplateHandler.js:convertAttribsToString. !! test @@ -11877,6 +12135,8 @@ parsoid ##{{[[-{{{{{{[[Foo|bar}}]]}-}}}}}]] !! test Preprocessor precedence 1: link is rightmost opening +!! options +parsoid=wt2html !! wikitext {{[[Foo|bar}}]] @@ -11885,13 +12145,17 @@ But close-brace is not a valid character in a link title: However, we can still tell this was handled as a link in the preprocessor: {{echo|[[Foo}}|bar]]|bat}} -!! html +!! html/php

        {{bar}}

        But close-brace is not a valid character in a link title: {{[[Foo}}|bar]]

        However, we can still tell this was handled as a link in the preprocessor: [[Foo}}|bar]]

        +!! html/parsoid +

        {{bar}}

        +

        But close-brace is not a valid character in a link title: {{[[Foo}}|bar]]

        +

        However, we can still tell this was handled as a link in the preprocessor: [[Foo}}|bar]]

        !! end !! test @@ -11900,26 +12164,33 @@ Preprocessor precedence 2: template is rightmost opening language=zh !! wikitext -{{echo|foo}-}}- -!! html +!! html/php

        -foo}--

        +!! html/parsoid +

        -foo}--

        !! end !! test Preprocessor precedence 3: language converter is rightmost opening !! options language=zh +parsoid=wt2html !! wikitext {{echo|hi}} {{-{R|echo|hi}}}- [[-{R|raw]]}- -!! html +!! html/php

        hi

        {{echo|hi}}

        [[raw]]

        +!! html/parsoid +

        hi

        +

        {{

        +

        [[

        !! end !! test @@ -11928,7 +12199,9 @@ Preprocessor precedence 4: left-most angle bracket language=zh !! wikitext -!! html +!! html/php +!! html/parsoid + !! end !! article @@ -11941,21 +12214,28 @@ Template:Precedence5 Preprocessor precedence 5: tplarg takes precedence over template !! wikitext {{Precedence5|Bullet}} -!! html +!! html/php
        • Bar
        +!! html/parsoid +
        • Bar
        !! end !! test Preprocessor precedence 6: broken link is rightmost opening +!! options +parsoid=wt2html !! wikitext {{echo|[[Foo}} {{echo|[[Foo|bar|bat=baz}} -!! html +!! html/php

        {{echo|[[Foo}}

        {{echo|[[Foo|bar|bat=baz}}

        +!! html/parsoid +

        {{echo|[[Foo}}

        +

        {{echo|[[Foo|bar|bat=baz}}

        !! end # This next test exposes a difference between PHP and Parsoid: @@ -11980,6 +12260,8 @@ Preprocessor precedence 6: broken link is rightmost opening !! test Preprocessor precedence 7: broken template is rightmost opening +!! options +parsoid=wt2html !! wikitext [[Foo|{{echo|Bar]] @@ -11987,12 +12269,17 @@ Preprocessor precedence 7: broken template is rightmost opening Careful: linktrails can move the end of the wikilink: [[Foo|{{echo|y']]a}}l]]l -!! html +!! html/php

        {{echo|Bar

        Bar-x-y]]-z

        Careful: linktrails can move the end of the wikilink: y'al]]l

        +!! html/parsoid +

        [[Foo|{{echo|Bar]]

        +

        Bar]]-x-y-z

        +

        Careful: linktrails can move the end of the wikilink: +y']]all

        !! end !! test @@ -12019,7 +12306,7 @@ Template:Preprocessor_precedence_9 Preprocessor precedence 9: groups of braces !! wikitext {{Preprocessor precedence 9|Four|Bullet|1|2}} -!! html +!! html/php
        4
        {Four}
        5
        @@ -12030,6 +12317,20 @@ Preprocessor precedence 9: groups of braces
        7
        {Bullet}
        +!! html/parsoid +
        +
        4
        +
        {Four}
        +
        5
        +
        +
          +
        • Bar
        • +
        +
        6
        +
        Four
        +
        7
        +
        {Bullet}
        +
        !! end !! article @@ -12050,7 +12351,7 @@ Preprocessor precedence 10: groups of braces with leading dash language=zh !! wikitext {{Preprocessor precedence 10|Three|raw2|Bullet|1|2}} -!! html +!! html/php
        1
        raw
        2
        @@ -12068,6 +12369,29 @@ language=zh
        7
        raw2
        +!! html/parsoid +
        +
        1
        +
        +
        2
        +
        -
        +
          +
        • Bar-
        • +
        +
        3
        +
        -Three-
        +
        4
        +
        +
        5
        +
        -
        +
          +
        • Bar-
        • +
        +
        6
        +
        -Three-
        +
        7
        +
        +
        !! end !! test @@ -12078,15 +12402,23 @@ Preprocessor precedence 11: found during visual diff testing {{echo|-{{echo|-{{echo|x}}}}}} {{echo|-{{echo|x}}}} -!! html +!! html/php

        --x

        --x

        -x

        +!! html/parsoid +

        --x

        + +

        --x

        + +

        -x

        !! end !! test Preprocessor precedence 12: broken language converter closed by brace. +!! options +parsoid=wt2html !! wikitext This form breaks the template, which is unfortunate: * {{echo|foo-{bar}bat}} @@ -12101,7 +12433,7 @@ tag, nothing bad happens: foo-{bar}bat {{echo|foo-{bar}bat}} -!! html+tidy +!! html/php+tidy

        This form breaks the template, which is unfortunate:

        • {{echo|foo-{bar}bat}}
        • @@ -12129,38 +12461,67 @@ array ( array ( ) +!! html/parsoid +

          This form breaks the template, which is unfortunate:

          +
            +
          • {{echo|foo-{bar}bat}}
          • +
          +

          But if the broken language converter markup is inside an extension tag, nothing bad happens:

          +
            +
          • foo-{bar}bat
          • +
          • foo-{bar}bat
          • +
          • foo-{bar}bat
          • +
          • foo-{bar}bat
          • +
          +
           
          
           !! end
           
           !! test
          -Preprocessor precedence, 13: broken language converter in external link
          +Preprocessor precedence 13: broken language converter in external link
          +!! options
          +parsoid=wt2html
           !! wikitext
           * [http://example.com/-{foo Example in URL]
           * [http://example.com Example in -{link} description]
           * {{echo|[http://example.com/-{foo Breaks template, however]}}
          -!! html+tidy
          +!! html/php+tidy
           
          +!! html/parsoid
          +
           !! end
           
           !! test
          -Preprocessor precedence, 14: broken language converter in comment
          +Preprocessor precedence 14: broken language converter in comment
           !! wikitext
           *  ...should be ok
           *  ...extra dashes
           * {{echo|foobat}} ...should be ok
          -!! html+tidy
          +!! html/php+tidy
           
          • ...should be ok
          • ...extra dashes
          • foobat ...should be ok
          +!! html/parsoid +
            +
          • ...should be ok
          • +
          • ...extra dashes
          • +
          • foobat ...should be ok
          • +
          !! end !! test -Preprocessor precedence, 15: broken brace markup in headings +Preprocessor precedence 15: broken brace markup in headings +!! options +parsoid=wt2html !! wikitext __NOTOC__ __NOEDITSECTION__ ===1 foo[bar 1=== @@ -12175,7 +12536,7 @@ __NOTOC__ __NOEDITSECTION__ 5 ===6 foo-{bar 6=== 6 -!! html+tidy +!! html/php+tidy

          1 foo[bar 1

          1

          2 foo[[bar 2

          @@ -12188,6 +12549,35 @@ __NOTOC__ __NOEDITSECTION__

          5

          6 foo-{bar 6

          6

          +!! html/parsoid + +

          1 foo[bar 1

          +

          1

          +

          2 foo[[bar 2

          +

          2

          +

          3 foo{bar 3

          +

          3

          +

          4 foo{{bar 4

          +

          4

          +

          5 foo{{{bar 5

          +

          5

          +

          6 foo-{bar 6

          +

          6

          +!! end + +!! test +Preprocessor precedence 16: matching closing braces to opening braces +!! options +language=zh +parsoid=wt2html +!! wikitext +-{{{echo|foo}}bar}- +!! html/php +

          foobar +

          +!! html/parsoid +

          !! end ### @@ -12914,7 +13304,7 @@ Templates: Wiki Tables: 7. Fosterable s should get fostered -
          1. ↑ foo
          +
          1. ↑ foo
          !!end !! test @@ -13126,8 +13516,16 @@ Templates: Parameters substituted at the top-level

          bar

          !! end -!!test -Parser Functions: 1. Simple example +!! test +Templates: Param with empty arg in the final position +!! wikitext +{{{hi|}}} +!! html/parsoid + +!! end + +!!test +Parser Functions: 1. Simple example !! wikitext {{uc:foo}} !! html @@ -13619,17 +14017,34 @@ pre-save transform: Signature expansion pst !! wikitext * ~~~ +* ~~~~ +* ~~~~~ * ~~~ * ~~~ * ~~~ !! html/php * [[Special:Contributions/127.0.0.1|127.0.0.1]] +* [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC) +* 00:02, 1 January 1970 (UTC) * [[Special:Contributions/127.0.0.1|127.0.0.1]] * [[Special:Contributions/127.0.0.1|127.0.0.1]] * [[Special:Contributions/127.0.0.1|127.0.0.1]] !! end +!! test +ParserOutput flags from signature expansion (T84843) +!! options +pst +showflags +!! wikitext +~~~~ +!! html/php +[[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC) +flags=user-signature +!! end + + !! test pre-save transform: Signature expansion in nowiki tags (T2093) !! options @@ -13852,6 +14267,16 @@ parsoid=wt2html,wt2wt,html2html

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

          +!! wikitext +[[File:Foobar.jpg]] +!! end + !! test Simple image (using File: namespace, now canonical) !! wikitext @@ -13918,6 +14343,20 @@ Image with caption, T55312 #3
          Caption page=stuff
          !! end +!! test +Image caption with pipe entity +!! wikitext +[[File:Foobar.jpg|thumb|one | two]] +[[File:Foobar.jpg|thumb|one ''two'' | three]] +!! html/php +
          one | two
          +
          one two | three
          + +!! html/parsoid +
          one | two
          +
          one two | three
          +!! end + !! test Allow empty links in image captions (T62753) !! options @@ -14395,6 +14834,28 @@ Alt image option should handle most kinds of wikitext without barfing
          This is a link and a bold template.
          This is the image caption
          !! end +!! test +Image with nested tables in caption +!! wikitext +[[File:Foobar.jpg|thumb|Foo
          +{| +| +{| +|z +|} +|} +]] +!! html/parsoid +
          Foo
          + + +
          + + +
          z
          +
          +!! end + ################### # Conflicting image format options. # First option specified should 'win'. @@ -14471,7 +14932,7 @@ parsoid=wt2html,wt2wt,html2html # enlarged. !! test -Image: "unspecified format" and border enlarge +Image: unspecified format and border enlarge !! options parsoid=wt2html,wt2wt,html2html !! wikitext @@ -14483,8 +14944,8 @@ parsoid=wt2html,wt2wt,html2html

          Foobar.jpg

          !! html/parsoid -

          -

          +

          +

          !! end !! test @@ -14530,8 +14991,8 @@ parsoid=wt2html,wt2wt,html2html
          Foobar.svg
          !! html/parsoid -
          -
          +
          +
          !! end !! test @@ -14560,8 +15021,8 @@ parsoid=wt2html,wt2wt,html2html

          Foobar.svg

          !! html/parsoid -

          -

          +

          +

          !! end !! test @@ -14658,7 +15119,7 @@ SVG thumbnails with no language set
          caption
          !! html/parsoid -
          caption
          +
          caption
          !! end !! test @@ -14671,7 +15132,7 @@ parsoid=wt2html,wt2wt,html2html
          caption
          !! html/parsoid -
          caption
          +
          caption
          !! end !! test @@ -15238,7 +15699,7 @@ T93580: 1. Templated inside block images !! html/parsoid
          Caption with templated ref: [1]
          -
          1. ↑ foo
          +
          1. ↑ foo
          !! end !! test @@ -15248,9 +15709,9 @@ T93580: 2. inside inline images !! html/parsoid -

          +

          -
          1. ↑ foo
          +
          1. ↑ foo
          !! end !! test @@ -15260,9 +15721,9 @@ T93580: 3. Templated inside inline images !! html/parsoid -

          +

          -
          1. ↑ foo
          +
          1. ↑ foo
          !! end ### @@ -15450,7 +15911,7 @@ Link to category !! wikitext [[:Category:MediaWiki User's Guide]] !! html -

          Category:MediaWiki User's Guide +

          Category:MediaWiki User's Guide

          !! end @@ -15775,6 +16236,68 @@ parsoid=wt2html !! end +!! test +9. Categories and newlines: should behave properly with linkprefix (T87753) +!! options +language=ar +!! wikitext +foo bar +foo bar +[[تصنيف:Foo]] +[[تصنيف:Bar]] +!! html/php +

          foo bar +foo bar +

          +!! html/parsoid +

          foo bar +foo bar

          + + +!! end + +!! test +10. No regressions on internal links following category (T174639) +!! options +parsoid=wt2html,html2html +!! wikitext +[[Category:Foo]]
          a + +[[Foo]]
          +!! html/php +
          a +Foo
          + +!! html/parsoid +
          a + +Foo
          +!! end + +# Note that Parsoid differs slightly from PHP due to T175421 +!! test +11. Special case where only newlines separate links (T175416) +!! options +parsoid=wt2html,html2html +!! wikitext +[[Category:Foo]] + +[[Foo]][[es:Alimento]] + +[[Foo]] +!! html/php +


          +Foo +

          Foo +

          +!! html/parsoid + + +

          Foo

          + +

          Foo

          +!! end + !! test Category links with multiple namespaces !! wikitext @@ -15822,6 +16345,20 @@ x[[Category:Foo]]y

          xy

          !! end +!! test +Link prefix/suffixes aren't applied to language links +!! options +parsoid=wt2html +language=is +!! wikitext +x[[es:Foo]]y +!! html/php +

          xy +

          +!! html/parsoid +

          xy

          +!! end + !! test Parsoid: Serialize link to file page with colon escape !! options @@ -16351,7 +16888,7 @@ section 5

          text & text[edit]

          section 3

          -

          text ' text[edit]

          +

          text ' text[edit]

          section 4

          text " text[edit]

          @@ -16779,6 +17316,24 @@ HTML tag with leading space is parsed as text

          !! end +## Don't expect Parsoid and PHP to match, since PHP isn't exactly following +## the HTML5 parsing spec. +!! test +Element with broken attribute syntax +!! options +parsoid=wt2html +!! wikitext +
          hi
          +
          ho
          +!! html/php +
          hi
          +
          ho
          + +!! html/parsoid +
          hi
          +
          ho
          +!! end + ### ### Nesting tests (see T43545, T52604, T53081) ### @@ -16867,11 +17422,17 @@ Nesting of Media link !! wikitext [[Media:Foobar.jpg]] +[[Media:Video.ogv]] +[[:Media:Video.ogv]] !! html/php

          Media:Foobar.jpg +Media:Video.ogv +Media:Video.ogv

          !! html/parsoid -

          Media:Foobar.jpg

          +

          Media:Foobar.jpg +Media:Video.ogv +Media:Video.ogv

          !! end !! test @@ -16938,8 +17499,6 @@ Image link to nonexistent file (T3850 - good)

          Image:No such.jpg

          !! end - - !! test Character reference normalization in link text (T3938) !! wikitext @@ -17775,7 +18334,7 @@ Parser hook: static parser hook inside a comment

          !! html/parsoid -

          +

          !! end # Nested template calls; this case was broken by Parser.php rev 1.506, @@ -17807,18 +18366,16 @@ Nested template calls ### Sanitizer ### -# HTML+Tidy effectively strips out the empty tags completely -# But since Parsoid doesn't it wraps the tags in p-tags -# which Tidy would have done for the PHP parser had there been content inside it. +# HTML+Tidy strips out empty tags completely. Parsoid doesn't. +# FIXME: Wikitext for this first test doesn't match its title. !! test Sanitizer: Closing of open tags !! wikitext
          -!! html -
          +!! html/php+tidy !! html/parsoid -

          +
          !! end !! test @@ -17935,12 +18492,17 @@ but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}- then we get cut off here: }- all additional text is vanished -!! html +!! html/php

          this bit is safe: }-

          but if we add a conversion instance: xxx

          then we get cut off here: }-

          all additional text is vanished

          +!! html/parsoid +

          this bit is safe: }-

          +

          but if we add a conversion instance:

          +

          then we get cut off here: }-

          +

          all additional text is vanished

          !! end !! test @@ -19523,7 +20085,7 @@ parsoid=wt2html ''''' !! html/php !! html/parsoid -

          + !! end # same html as previous, but wikitext adjusted to match parsoid html2wt @@ -19647,7 +20209,7 @@ File:File:Foobar.jpg !! html/parsoid !! end @@ -19710,12 +20272,12 @@ image4 |300px| centre !! html/parsoid !! end @@ -19773,11 +20335,11 @@ image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla. !! html/parsoid !! end @@ -19832,13 +20394,13 @@ image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
        !! html/parsoid -