Last modified: 2012-07-03 06:55:18 UTC
When I use in a table align="right" doesn't display on the right side... {| align="right" border="1" | Col 1, row 1 | rowspan="2" | Col 2, row 1 (and 2) | Col 3, row 1 |- | Col 1, row 2 | Col 3, row 2 |} with style="float:right;" it works, but before running versions align="right" works, too. {| style="float:right;" border="1" | Col 1, row 1 | rowspan="2" | Col 2, row 1 (and 2) | Col 3, row 1 |- | Col 1, row 2 | Col 3, row 2 |}
Which browser? Tested firefox, chromium and Opera on https://en.wikipedia.org/wiki/User:MarkAHershberger/sandbox3 and all appeared to work.
Looks like it works on wikipedia.org sites, but mediawiki.org same problem with the systax like my private wiki (based on Mediawiki 1.19.0)...
Yes I can confirm this bug. For me its the Align=center. It used to work OK before and its messed up some formatting. It works on Wikipedia and it doesn't work on a new 1.19. {| align="center" is rendered on a new MW 1.19 and on Mediawiki.org as: <table style="text-align: center;"> But it renders differently on en.Wikipedia.org: <table align="center">
There's two additional bugs (duplicate). One of them has a suggested solution for correct CSS (I didn't verify the solution to see if its the best): https://bugzilla.wikimedia.org/show_bug.cgi?id=36586 The other duplicate is: https://bugzilla.wikimedia.org/show_bug.cgi?id=37114
* align="left" and align="right" have been deprecated for years. All browsers around today map this internally to float:left and float:right respectively. * float: center; doesn't exist and has never existed. This is a common mistake but not a bug. * As of MediaWiki 1.19 the Sanitizer class converts these to CSS (but only if the wiki is in HTML5 mode, which it is by default, but Wikipedia has HTML5 mode disabled. MediaWiki.org has it enabled and your own install will have it enabled by default as well) * Short term solution: Do not use align="", valign="", clear="" etc. Instead use CSS or inline style="" as these attributes have all been deprecated for a long time. * Long term solution: align="" is converted by Sanitizer to only text-align. For left/right it should also include `float` (depending on the element).
*** Bug 37114 has been marked as a duplicate of this bug. ***
*** Bug 36586 has been marked as a duplicate of this bug. ***
(aggregated from the dupes) * align="*" on table-cells (left, right, center) -> style="text-align: *;" * align="*" on other elements (left, right) -> style="float: *;" * align="center" on other elements -> style="margin-left: auto; margin-right: auto;"
Sanitizer::fixDeprecatedAttributes https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=includes/Sanitizer.php;hb=bc9d9f1f9c796ee01234f484724cc064b9008eba#l614
(In reply to comment #9) > Sanitizer::fixDeprecatedAttributes > > https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=includes/Sanitizer.php;hb=bc9d9f1f9c796ee01234f484724cc064b9008eba#l614 Per [1], this link points to the cave where this bug is making out. -- Krinkle [1] http://lists.wikimedia.org/pipermail/wikitech-l/2012-June/061496.html
Proposed fix submitted in https://gerrit.wikimedia.org/r/13479
I108cbd100cff6bade011b14d74b5bca82f2a1e5f: Merged in master.