Set $wgUserEmailUseReplyTo = true by default
[lhc/web/wiklou.git] / tests / parser / parserTests.txt
index ba7b0d4..5b17eac 100644 (file)
@@ -1,5 +1,5 @@
 # MediaWiki Parser test cases
-# Some taken from http://meta.wikimedia.org/wiki/Parser_testing
+# Some taken from https://meta.wikimedia.org/wiki/Parser_testing
 # All (C) their respective authors and released under the GPL
 #
 # The syntax should be fairly self-explanatory.
@@ -524,7 +524,7 @@ http://fr.wikipedia.org/wiki/🍺
 !! end
 
 # Note that the html+tidy output removes the spaces after the <li>,
-# which is a bug (http://sourceforge.net/p/tidy/bugs/945/, etc).
+# which is a bug (https://sourceforge.net/p/tidy/bugs/945/, etc).
 # This is an issue for all tests with lists.  We intentionally do
 # *not* add html+tidy clauses for these, as we don't want to
 # document/test the broken behavior.  (Parsoid matches the non-tidy
@@ -1230,7 +1230,7 @@ Text-level semantic html elements in wikitext
 !! end
 
 # test cases taken from
-# http://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
+# https://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
 !! test
 Ruby markup (W3C-style)
 !! wikitext
@@ -1293,7 +1293,7 @@ Non-word characters don't terminate tag names (bug 17663, 40670, 52022)
 </p>
 !! end
 
-# There is a tidy bug here: http://sourceforge.net/p/tidy/bugs/946/
+# There is a tidy bug here: https://sourceforge.net/p/tidy/bugs/946/
 # If the non-word-character tag made it through the sanitizer, tidy
 # would munge it up.
 !! test
@@ -1420,6 +1420,15 @@ sed abit.
 </span></p>
 !! end
 
+!! test
+Don't parse <nowiki><span class="error"></nowiki> (T149622)
+!! wikitext
+<nowiki><span class="error"></nowiki>
+!! html/php
+<p>&lt;span class="error"&gt;
+</p>
+!! end
+
 !! test
 nowiki 3
 !! wikitext
@@ -2703,10 +2712,12 @@ Templates: Handle empty comment-and-ws-only lines correctly
 <!--should be ignored-->
  <!--should be ignored as well-->
 bar}}
-!! html
+!! html/php
 <p>foo
 bar
 </p>
+!! html/parsoid
+<p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo\n&lt;!--should be ignored-->\n &lt;!--should be ignored as well-->\nbar"}},"i":0}}]}'>foo <!--should be ignored--> <!--should be ignored as well--> bar</p>
 !! end
 
 !! test
@@ -2722,7 +2733,13 @@ Templates: Handle comments in the target
 {{echo<!-- should be ignored -->|foo}}
 
 {{<!-- should be ignored -->echo|foo}}
-!!html/parsoid
+!! html/php
+<p>foo
+</p><p>foo
+</p><p>foo
+</p><p>foo
+</p>
+!! html/parsoid
 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n&lt;!-- should be ignored -->\n","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
 
 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo&lt;!-- should be ignored -->\n","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
@@ -2746,7 +2763,13 @@ Templates: Handle comments in parameter names (bug 67657)
 {{echo|1<!-- should be ignored -->=foo}}
 
 {{echo|<!-- should be ignored -->1=foo}}
-!!html/parsoid
+!! html/php
+<p>foo
+</p><p>foo
+</p><p>foo
+</p><p>foo
+</p>
+!! html/parsoid
 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"1\n&lt;!-- should be ignored -->"}}},"i":0}}]}'>foo</p>
 
 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo","key":{"wt":"&lt;!-- should be ignored -->\n1"}}},"i":0}}]}'>foo</p>
@@ -2760,11 +2783,11 @@ Templates: Handle comments in parameter names (bug 67657)
 Templates: Other wikitext in parameter names (bug 67657)
 !! wikitext
 {{echo|''1''=foo}}
-!!html/parsoid
-<p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"&#39;&#39;1&#39;&#39;":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
-!!html/php
+!! html/php
 <p>{{{1}}}
 </p>
+!! html/parsoid
+<p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"&#39;&#39;1&#39;&#39;":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
 !!end
 
 #--------------------------------------------------------------------
@@ -3840,7 +3863,7 @@ Definition Lists: Hacky use to indent tables (WS-insensitive)
 ## All Parsoid only definition list tests have this difference.
 ##
 ## See also: https://phabricator.wikimedia.org/T8569
-## and http://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
+## and https://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
 
 !! test
 Table / list interaction: indented table with lists in table contents
@@ -5194,7 +5217,7 @@ http://www.example.com/?title=AT%26T
 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
 !! end
 
-# According to http://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
+# According to https://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
 # % is actually legal in HTML5. Any change in output would need testing though.
 !! test
 Bug 4781, 5267: %25 in URL
@@ -5781,7 +5804,7 @@ Plain ''italic'''s plain
 
 # This should not produce <table></table> as <table><tr><td></td></tr></table>
 # is the bare minimum required by the spec, see:
-# http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
+# https://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
 # Parsoid team replies: empty table tags are legal in HTML5
 !! test
 A table with no data.
@@ -7417,6 +7440,23 @@ Piped link with no link text
 <p>[[Thomas Bek (bishop of St David's)|]]</p>
 !! end
 
+!! test
+Piped link with empty link text
+!! wikitext
+[[Main Page|<nowiki />]] - empty nowiki
+[[Main Page| ]] - empty space
+[[Main Page|&nbsp;]] - empty non breaking space
+!! html/php
+<p><a href="/wiki/Main_Page" title="Main Page"></a> - empty nowiki
+<a href="/wiki/Main_Page" title="Main Page"> </a> - empty space
+<a href="/wiki/Main_Page" title="Main Page">&#160;</a> - empty non breaking space
+</p>
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><meta typeof="mw:Placeholder" data-parsoid='{"src":"&lt;nowiki />"}'/></a> - empty nowiki
+<a rel="mw:WikiLink" href="./Main_Page" title="Main Page"> </a> - empty space
+<a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:Entity" data-parsoid='{"src":"&amp;nbsp;","srcContent":" "}'> </span></a> - empty non breaking space</p>
+!! end
+
 !! test
 Broken link
 !! wikitext
@@ -19098,7 +19138,7 @@ parsoid=wt2html,wt2wt,html2html
 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
 !! end
 
-# See: http://www.w3.org/TR/html5/syntax.html#character-references
+# See: https://www.w3.org/TR/html5/syntax.html#character-references
 # Note that U+000C (form feed) is not a valid XML character, so
 # it is banned even though allowed in HTML5.
 !! test