From 596be27bd0b0156da93b1ecdbdaf719dc42adc0c Mon Sep 17 00:00:00 2001 From: Daniel Friesen Date: Sun, 25 Sep 2011 02:58:03 +0000 Subject: [PATCH] Followup r94465; Add parser tests and turn the feature on-by-default like I intended for it (I guess I forgot to return it to true when I was testing it as off) --- includes/DefaultSettings.php | 2 +- tests/parser/parserTests.txt | 40 +++++++++++++++++++++++++----------- 2 files changed, 29 insertions(+), 13 deletions(-) diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index b9dacbf44d..71ecd5c124 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -2186,7 +2186,7 @@ $wgAllowMicrodataAttributes = false; /** * Cleanup as much presentational html like valign -> css vertical-align as we can */ -$wgCleanupPresentationalAttributes = false; +$wgCleanupPresentationalAttributes = true; /** * Should we try to make our HTML output well-formed XML? If set to false, diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index 232b7d4489..c6bdb44c91 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -1346,7 +1346,7 @@ Multiplication table !! test Table rowspan !! input -{| align=right border=1 +{| border=1 | Cell 1, row 1 |rowspan=2| Cell 2, row 1 (and 2) | Cell 3, row 1 @@ -1355,7 +1355,7 @@ Table rowspan | Cell 3, row 2 |} !! result - +
@@ -1968,13 +1968,13 @@ Incorrecly removing closing slashes from correctly formed XHTML !! test Failing to transform badly formed HTML into correct XHTML !! input -
-
-
+
+
+
!! result -


-
-
+


+
+

!!end @@ -4517,9 +4517,9 @@ div with unquoted attribute !! test div with illegal double attributes !! input -
HTML rocks
+
HTML rocks
!! result -
HTML rocks
+
HTML rocks
!!end @@ -4549,9 +4549,9 @@ Table multiple attributes correction !! test DIV IN UPPERCASE !! input -
HTML ROCKS
+
HTML ROCKS
!! result -
HTML ROCKS
+
HTML ROCKS
!!end @@ -8799,6 +8799,22 @@ disabled ... !! end +!! test +Deprecated presentational attributes are converted to css +!! input +{| +| valign=top align=left width=100 height=25% | Asdf +|} + +!! result +
Cell 1, row 1
+ +
Asdf +
+ + +!! end + TODO: more images more tables -- 2.20.1