From 52363db5666b0af739a5cbf3d5a9c715e0f8ba11 Mon Sep 17 00:00:00 2001
From: Subramanya Sastry [Main_Page bar] [Main Page bar] a a
-! not a table heading
-|- not a table row
-| not a table cell
-| class="foo bar" | baz
-b
-|}
-|-
-c
-
-
-
-!! html+tidy
-
-
-!!end
+ a
+NULL
+array (
+)
+
-!! test
-Table wikitext syntax outside wiki-tables
-!! wikitext
-a
-! not a table heading
-|- not a table row
-| not a table cell
-| class="foo bar" | baz
-b
-|}
-|-
-c
-!! html
-
URL in text: http://example.com
+!! html/parsoid +URL in text: http://example.com
!! end !! test @@ -7619,11 +7587,14 @@ Just a test of an article title containing a percent. Link containing % (not as a hex sequence) !! wikitext [[7% Solution]] +[[7% Solution|7%25 Solution]] !! html/php !! html/parsoid - + !! end # note that the parsoid HTML is identical to the previous test output, @@ -7635,11 +7606,14 @@ Link containing % as a single hex sequence interpreted to char parsoid=wt2wt,wt2html,html2html !! wikitext [[7%25 Solution]] +[[7%25 Solution|7%25 Solution]] !! html/php !! html/parsoid - + !!end !! test @@ -8004,6 +7978,28 @@ Link with multiple ":" in a subpage-supporting namespace (bug 63636) !! end +## Mainly a sanity check for Parsoid +!! test +Handle title parsing for subpages +!! options +title=[[/123123]] +!! wikitext +123 +!! html/parsoid +123
+!! end + +## FIXME: Add a working php section here +!! test +Link to a subpage from a namespace other than main +!! options +title=[[User:test]] +!! wikitext +[[/123]] +!! html/parsoid + +!! end + !! test Purely hash wikilink !! options @@ -8515,18 +8511,25 @@ language=ln !! test Parsoid bug 53221: Wikilinks should be properly entity-escaped !! options -parsoid=html2wt +parsoid={ "modes": ["html2wt"], "suppressErrors": true } !! html/parsoidHe llo He llo
He llo He llo
!! wikitext He llo [[Foo|He llo]] -He llo [[He llo]] +He llo He llo +!! html/php +He llo He llo +
He llo He llo +
!! end +# html2wt will fail because of title normalization without data-parsoid !! test Parsoid: handle constructor well +!! options +parsoid=wt2html,wt2wt !! wikitext [[constructor]] @@ -8536,9 +8539,9 @@ Parsoid: handle constructor well !! html/parsoid - + - + !! end !! article @@ -10140,7 +10143,7 @@ Parsoid: Page property magic word with magic word contents !! wikitext {{DISPLAYTITLE:''{{PAGENAME}}''}} !! html/parsoid - + !! end !! test @@ -10970,7 +10973,7 @@ foo {{''}} bazfoo bar baz
!! html/parsoid -foo bar baz +
foo bar baz
!! end @@ -11444,6 +11447,33 @@ parsoid=wt2html !!end +!! test +Table wikitext syntax outside wiki-tables +!! wikitext +a +|+ not a caption +! not a table heading +|- not a table row +| not a table cell +| class="foo bar" | baz +b +|} +|- +c +!! html +a +|+ not a caption +! not a table heading +|- not a table row +| not a table cell +| class="foo bar" | baz +b +|} +|- +c +
+!! end + ### ### Testing parsing of templates where a template arg ### has the same name as the template itself. @@ -13955,6 +13985,17 @@ Escape HTML special chars in image alt text !! end +!! test +Entities in file name and attributes +!! wikitext +[[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]] +!! html/php + +!! html/parsoid + +!! end + !! test BUG 499: Alt text should have Ӓ, not &1234; !! wikitext @@ -14920,6 +14961,14 @@ parsoid=wt2html !! end +!! test +Category links with multiple namespaces +!! wikitext +[[Category:Project:Foo]] +!! html/parsoid + +!! end + !! test Parsoid: Serialize link to category page with colon escape !! options @@ -19329,10 +19378,14 @@ subpage title=[[Subpage test/L1/L2]] !! end +# This is wt2html only in Parsoid because we addhttp://www.google.com gopher://www.google.com http://www.google.com @@ -20057,6 +20114,14 @@ gopher://www.google.com www.гоогле.Ñом/ÑÑп://Ð´Ð¸Ñ www.гоогле.Ñом
+!! html/parsoid +http://www.google.com +gopher://www.google.com +http://www.google.com +gopher://www.google.com +irc://www.google.com +www.гоогле.Ñом/ÑÑп://Ð´Ð¸Ñ +www.гоогле.Ñом
!! end !! test @@ -24954,11 +25019,25 @@ Don't block XML namespace declaration # ----------------------------------------------------------------- # The following section of tests are primarily to spec requirements -# around serialization of new/edited content. +# around Parsoid's serialization (old, new, edited content) # # All these tests are marked Parsoid html2wt and html2html only # ---------------------------------------------------------------- +!! test +Ignore rel attribute in a-tags during serialization to url-links +!! options +parsoid=html2wt +!! html/parsoid +http://en.wikipedia.org/wiki/Foobar +http://en.wikipedia.org/wiki/Foobar +http://en.wikipedia.org/wiki/Foobar +!! wikitext +http://en.wikipedia.org/wiki/Foobar +http://en.wikipedia.org/wiki/Foobar +http://en.wikipedia.org/wiki/Foobar +!! end + # 'mi' is a localinterwiki prefix as well as a language !! test Serialize interwiki links pointing to the current wiki as plain wiki links (bug 65869) @@ -24978,9 +25057,15 @@ parsoid=html2wt !! html/parsoid Foo Foo +//en.wikipedia.org/wiki/Foo +http://en.wikipedia.org/wiki/Foo +//en.wikipedia.org/wiki/Foo bar !! wikitext [[Foo]] [[Foo]] +[[:en:Foo|//en.wikipedia.org/wiki/Foo]] +http://en.wikipedia.org/wiki/Foo +[[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]] !! end !! test @@ -25291,6 +25376,17 @@ parsoid=html2wt [[File:Foobar.jpg|link=]] !! end +!! test +Image: Invalid title as link +!! wikitext +[[File:Foobar.jpg|link=<]] +!! html/php + +!! html/parsoid + +!! end + !! test Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does) !! options -- 2.20.1