X-Git-Url: https://git.cyclocoop.org/%242?a=blobdiff_plain;f=tests%2Fparser%2FparserTests.txt;h=4c6c9a5b31ceb2ff077a7f8a858f77e70241cd09;hb=a05971dfc7fdd78be02edae4855ca808dc599cda;hp=9cada85c821ad1493e683b2ba5b37e6cec6af6fc;hpb=0a138f1acf224675f1a70eff8eea63c8d70a17dc;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index 9cada85c82..4c6c9a5b31 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -4646,6 +4646,9 @@ http://example.com? http://example.com) http://example.com/url_with_(brackets) (http://example.com/url_without_brackets) +http://example.com/url_with_entity& +http://example.com/url_with_entity& +http://example.com/url_with_entity& http://example.com/url_with_entity  http://example.com/url_with_entity  http://example.com/url_with_entity  @@ -4663,12 +4666,15 @@ http://example.com/url_with_entity< http://example.com) http://example.com/url_with_(brackets) (http://example.com/url_without_brackets) -http://example.com/url_with_entity  -http://example.com/url_with_entity  -http://example.com/url_with_entity  +http://example.com/url_with_entity& +http://example.com/url_with_entity& +http://example.com/url_with_entity& +http://example.com/url_with_entity  +http://example.com/url_with_entity  +http://example.com/url_with_entity  http://example.com/url_with_entity< -http://example.com/url_with_entity%3C -http://example.com/url_with_entity%3C +http://example.com/url_with_entity< +http://example.com/url_with_entity<

!! html/parsoid

http://example.com, @@ -5711,7 +5717,7 @@ Plain ''italic'''s plain ### ### Tables ### -### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User's_Guide:_Using_tables +### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables ### # This should not produce
as
@@ -6240,7 +6246,7 @@ Table cell attributes: Pipes protected by nowikis should be treated as a plain c | title="foo|" |bar | title="foo|" bar |} -!! html +!! html/php
bar @@ -6250,12 +6256,19 @@ Table cell attributes: Pipes protected by nowikis should be treated as a plain c title="foo|" bar
+!! html/parsoid + + + + +
barbar title="foo|" bar
!! end -# The "|}" to close the table is missing from the input, so parsoid's -# *2wt modes will fail. +# See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html +# N.B. The "|}" to close the table is missing from the input, so parsoid's +# *2wt modes will fail. !! test -Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html) +Table security: embedded pipes !! options parsoid=wt2html,html2html !! wikitext @@ -6273,12 +6286,14 @@ parsoid=wt2html,html2html !! html/parsoid -
" onmouseover="alert(document.cookie)">test
+" onmouseover="alert(document.cookie)">test !! end -# FIXME: The php output is broken. +# FIXME: The output seems broken. Filed as T110268. !! test ! and || in td attributes should not be parsed as / +!! options +parsoid=wt2html !! wikitext {| | style="color: red !important;" data-contrived="put this here ||" | foo @@ -6292,7 +6307,7 @@ parsoid=wt2html,html2html !! html/parsoid - +
foo
style="color: red !important;" data-contrived="put this here foo
!! end @@ -6934,6 +6949,23 @@ foo !!end +!! test +Tables: Digest broken attributes on table and tr tag +!! options +parsoid=wt2html +!! wikitext +{| || |} ++ +|- || || ++ -- +|- > [ +|} +!! html + + + + +
+!! end + !! test Strip unsupported table tags !! options @@ -7144,8 +7176,10 @@ Link with HTML entity in suffix / tail Link with 3 brackets !! wikitext [[[Main Page]]] +Foo [[[Main Page]]] !! html

[[[Main Page]]] +Foo [[[Main Page]]]

!! end @@ -7368,7 +7402,7 @@ Link containing double-single-quotes '' (bug 4598) !! 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

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

File:Denys Savchenko Pentecoste.jpg -

''Pentecoste'' -

Pentecoste -

Pentecoste +

File:Denys Savchenko Pentecoste.jpg +

''Pentecoste'' +

Pentecoste +

Pentecoste

!! html/parsoid

@@ -13838,9 +13872,9 @@ bar bar

!! end -## Edge case bug in Parsoid +## Edge case bugs in Parsoid from T93580 !! test -T93580: Templated inside images +T93580: 1. Templated inside block images !! wikitext [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|foo}}]] @@ -13851,6 +13885,30 @@ T93580: Templated inside images
  1. ↑ foo
!! end +!! test +T93580: 2. inside inline images +!! wikitext +[[File:Foobar.jpg|Undisplayed caption in inline image with ref: foo]] + + +!! html/parsoid +

+ +
  1. ↑ foo
+!! end + +!! test +T93580: 3. Templated inside inline images +!! wikitext +[[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|{{echo|foo}}}}]] + + +!! html/parsoid +

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

Category:MediaWiki User's Guide +

Category:MediaWiki User's Guide

!! end @@ -14044,7 +14102,7 @@ cat !! wikitext [[Category:MediaWiki User's Guide]] !! html -MediaWiki User's Guide +MediaWiki User's Guide !! end !! test @@ -14063,7 +14121,7 @@ cat !! wikitext [[Category:MediaWiki User's Guide|Foo]] !! html -MediaWiki User's Guide +MediaWiki User's Guide !! end !! test @@ -14073,7 +14131,7 @@ cat !! wikitext [[Category:MediaWiki User's Guide|MediaWiki User's Guide]] !! html -MediaWiki User's Guide +MediaWiki User's Guide !! end !! test @@ -15851,6 +15909,7 @@ MSIE 6 CSS safety test: sup/sub script (bug 55332) !! end +# FIXME: Parsoid fails to sanitize this! See T58846. !! test Opera -o-link CSS !! wikitext @@ -19025,7 +19084,7 @@ language=sr cat !! wikitext [[Category:МедиаWики Усер'с Гуиде]] !! html -MediaWiki User's Guide +MediaWiki User's Guide !! end @@ -20673,14 +20732,18 @@ __TOC__

[edit]

!! end +# Don't expect Parsoid to roundtrip this until the php parser comes closer to +# html5 tag parsing. !! test Tags with parameters in TOC +!! options +parsoid=wt2html !! wikitext __TOC__ == Hello == == Evilbye == -!! html +!! html/php

Contents

  • 1 Hello
  • @@ -20691,6 +20754,11 @@ __TOC__

    Hello[edit]

    b">Evilbye[edit]

    +!! html/parsoid + +

    Hello

    + +

    b">Evilbye

    !! end !! test @@ -20981,7 +21049,7 @@ File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascri !! html