Followup r94465; Add parser tests and turn the feature on-by-default like I intended...
authorDaniel Friesen <dantman@users.mediawiki.org>
Sun, 25 Sep 2011 02:58:03 +0000 (02:58 +0000)
committerDaniel Friesen <dantman@users.mediawiki.org>
Sun, 25 Sep 2011 02:58:03 +0000 (02:58 +0000)
includes/DefaultSettings.php
tests/parser/parserTests.txt

index b9dacbf..71ecd5c 100644 (file)
@@ -2186,7 +2186,7 @@ $wgAllowMicrodataAttributes = false;
 /**
  * Cleanup as much presentational html like valign -> css vertical-align as we can
  */
 /**
  * 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,
 
 /**
  * Should we try to make our HTML output well-formed XML?  If set to false,
index 232b7d4..c6bdb44 100644 (file)
@@ -1346,7 +1346,7 @@ Multiplication table
 !! test
 Table rowspan
 !! input
 !! 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 
 | 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
 | Cell 3, row 2 
 |}
 !! result
-<table align="right" border="1">
+<table border="1">
 <tr>
 <td> Cell 1, row 1
 </td>
 <tr>
 <td> Cell 1, row 1
 </td>
@@ -1968,13 +1968,13 @@ Incorrecly removing closing slashes from correctly formed XHTML
 !! test 
 Failing to transform badly formed HTML into correct XHTML
 !! input
 !! test 
 Failing to transform badly formed HTML into correct XHTML
 !! input
-<br clear=left>
-<br clear=right>
-<br clear=all>
+<br style="clear: left;">
+<br style="clear: right;">
+<br style="clear: both;">
 !! result
 !! result
-<p><br clear="left" />
-<br clear="right" />
-<br clear="all" />
+<p><br style="clear: left;" />
+<br style="clear: right;" />
+<br style="clear: both;" />
 </p>
 !!end
 
 </p>
 !!end
 
@@ -4517,9 +4517,9 @@ div with unquoted attribute
 !! test
 div with illegal double attributes
 !! input
 !! test
 div with illegal double attributes
 !! input
-<div align="center" align="right">HTML rocks</div>
+<div id="a" id="b">HTML rocks</div>
 !! result
 !! result
-<div align="right">HTML rocks</div>
+<div id="b">HTML rocks</div>
 
 !!end
 
 
 !!end
 
@@ -4549,9 +4549,9 @@ Table multiple attributes correction
 !! test
 DIV IN UPPERCASE
 !! input
 !! test
 DIV IN UPPERCASE
 !! input
-<DIV ALIGN="center">HTML ROCKS</DIV>
+<DIV ID="x">HTML ROCKS</DIV>
 !! result
 !! result
-<div align="center">HTML ROCKS</div>
+<div id="x">HTML ROCKS</div>
 
 !!end
 
 
 !!end
 
@@ -8799,6 +8799,22 @@ disabled
 ...
 !! end
 
 ...
 !! end
 
+!! test
+Deprecated presentational attributes are converted to css
+!! input
+{|
+| valign=top align=left width=100 height=25% | Asdf
+|}
+<ul type="disc"></ul>
+!! result
+<table>
+<tr>
+<td style="text-align: left; height: 25%; vertical-align: top; width: 100px;"> Asdf
+</td></tr></table>
+<ul style="list-style-type: disc;"></ul>
+
+!! end
+
 TODO:
 more images
 more tables
 TODO:
 more images
 more tables