!! end
+!! article
+Foo & bar
+!! text
+Just a test of an article title containing an ampersand
+!! endarticle
+
+!! test
+Link containing an ampersand
+!! wikitext
+[[Foo & bar]]
+
+[[Foo & bar]]
+
+[[Foo & bar]]
+!! html/php+tidy
+
+!! end
+
!! article
Foo~bar
!! text
@@ -15001,6 +15032,321 @@ Alt image option should handle most kinds of wikitext without barfing
!! end
+!! test
+Ampersand in alt attribute (T206940)
+!! wikitext
+[[File:Foobar.jpg|alt=&]]
+
+
+
+File:Foobar.jpg|alt=&
+
+!! html/php+tidy
+
+
+
+
+
+
+
+
+
+!! html/parsoid
+
+
+
+
+
+
+
+
+
+!! end
+
+!! test
+Italics markup in alt attribute (T206940)
+!! wikitext
+[[File:Foobar.jpg|alt=''x''|caption]]
+
+
+
+File:Foobar.jpg|alt=''x''|caption
+
+!! html/php+tidy
+
+
+
+
+
+
+
caption
+
+
+
+
+!! html/parsoid
+
+
+
+
+
+
+
caption
+
+
+!! end
+
+!! test
+Nowiki markup in alt attribute (T206940)
+!! wikitext
+[[File:Foobar.jpg|alt=''x''|caption]]
+
+
+
+File:Foobar.jpg|alt=''x''|caption
+
+!! html/php+tidy
+
+
+
+
+
+
+
caption
+
+
+
+
+!! html/parsoid
+
+
+
+
+
+
+
caption
+
+
+!! end
+
+!! test
+Nowiki markup in alt attribute (edited html, no data-parsoid) (T206940)
+!! wikitext
+[[File:Foobar.jpg|alt=''x''|caption]]
+
+
+
+File:Foobar.jpg|alt=''x''|caption
+
+!! html/php+tidy
+
+
+
+
+
+
+
caption
+
+
+
+
+!! html/parsoid
+
+
+
+
+
+
+
caption
+
+
+!! end
+
+!! test
+Ampersand in link attribute (T206940)
+!! wikitext
+[[File:Foobar.jpg|link=Foo & bar]]
+
+
+
+File:Foobar.jpg|link=Foo & bar
+
+!! html/php+tidy
+
+
+
+
+
+
+
+
+
+!! html/parsoid
+
+
+
+
+
+
+
+
+
+!! end
+
+!! test
+Ampersand in link attribute (edited html, no data-parsoid) (T206940)
+!! wikitext
+[[File:Foobar.jpg|link=Foo_&_bar]]
+
+
+
+File:Foobar.jpg|link=Foo_&_bar
+
+!! html/php+tidy
+
+
+
+
+
+
+
+
+
+!! html/parsoid
+
+
+
+
+
+
+
+
+
+!! end
+
+!! test
+Italics markup in link attribute (T206940)
+!! wikitext
+[[Foo''s bar''s]]
+
+
+[[File:Foobar.jpg|link=Foo''s bar''s|caption1]]
+
+[[File:Foobar.jpg|link=''Main Page''|caption2]]
+
+
+
+File:Foobar.jpg|link=Foo''s bar''s|caption1
+File:Foobar.jpg|link=''Main Page''|caption2
+
+!! html/php+tidy
+
+!! end
+
+!! test
+Nowiki markup in link attribute (T206940)
+!! wikitext
+[[File:Foobar.jpg|link=Foo''s_bar''s|caption]]
+
+
+
+File:Foobar.jpg|link=Foo''s_bar''s|caption
+
+!! html/php+tidy
+
+
+
+
+
+
+
caption
+
+
+
+
+!! html/parsoid
+
+
+
+
+
+
+
caption
+
+
+!! end
+
+!! test
+Nowiki markup in link attribute (edited html, no data-parsoid) (T206940)
+!! wikitext
+[[File:Foobar.jpg|link=Foo''s_bar''s|caption]]
+
+
+
+File:Foobar.jpg|link=Foo''s_bar''s|caption
+
+!! html/php+tidy
+
+
+
+
+
+
+
caption
+
+
+
+
+!! html/parsoid
+
+
+
+
+
+
+
caption
+
+
+!! end
+
!! test
Image with table with attributes in caption
!! options
@@ -15370,6 +15716,30 @@ parsoid=wt2html,wt2wt,html2html
!! end
+!! test
+SVG thumbnails in page language
+!! options
+language=ru
+wgMediaInTargetLanguage = true
+!! wikitext
+[[File:Foobar.svg]] [[File:Foobar.svg|lang=en]]
+!! html/php
+
+
+!! end
+
+!! test
+SVG thumbnails in page language not present in the file
+!! options
+language=de
+wgMediaInTargetLanguage = true
+!! wikitext
+[[File:Foobar.svg]] [[File:Foobar.svg|lang=ru]]
+!! html/php
+
+
+!! end
+
!! test
T3887: A ISBN with a thumbnail
!! wikitext
@@ -21728,6 +22098,8 @@ wgRawHtml=1
!! html/php
+!! html/parsoid
+
!! end
!! test
@@ -24865,9 +25237,30 @@ __TOC__
!! end
!! test
@@ -30004,15 +30397,14 @@ parsoid={
"modes": ["selser"],
"scrubWikitext": true,
"changes": [
- [ "#x", "after", "
\n
x
"]
+ [ "#x", "after", "
\n
bar
"]
]
}
!! wikitext
-foo
+
foo
!! wikitext/edited
-foo
-
-x
+
foo
+bar
!! end
!! test
@@ -30664,8 +31056,18 @@ styletag=1
+!! html/parsoid
+
+
+
+
!! end
+## Right now, Parsoid doesn't de-duplicate style tags.
+## So, we shouldn't see link tags that need to bypass the sanitizer.
+## In a followup patch, when we de-duplicate style tags and
+## introduce link tags, we'll add a hook for link tags in
+## the parser test runner script.
!! test
Validating that
bar
+!! html/parsoid
+
A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
+
+
+
+
<link rel="foo" href="bar"/>
+
+
But if it's on a line with other content, let it be wrapped.
+
+
bar
+
+
foo
+
+
foo bar
+
+
And the same if we have non-paragraph-breaking whitespace
+
+
foo
+
+bar
!! end
!! test
@@ -30746,6 +31168,24 @@ bar
!! end
+!! test
+Extension returning multiple nodes starting with a style tag roundtrips
+!! options
+wgRawHtml=1
+!! wikitext
+
+{{echo|
+}}
+
ho
+
+!! html/parsoid
+
+
+
+
ho
+
+!! end
+
!! test
Decoding of HTML entities in headings and links for IDs and link fragments (T103714)
!! config