GWicke has uploaded a new change for review. https://gerrit.wikimedia.org/r/99011
Change subject: Bug 54438: First part of core change 97caae596: support time/data/mark elements ...................................................................... Bug 54438: First part of core change 97caae596: support time/data/mark elements These are now allowed by default in the core sanitizer, so allow them in Parsoid too. Other parts of 97caae596 are not done yet. Will leave the bug open until the other changes are ported too. Change-Id: I668ad89aad9f6c798645d081b5971719175b7ea5 --- M js/lib/ext.core.Sanitizer.js M js/lib/mediawiki.wikitext.constants.js M js/tests/parserTests.txt 3 files changed, 23 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid refs/changes/11/99011/1 diff --git a/js/lib/ext.core.Sanitizer.js b/js/lib/ext.core.Sanitizer.js index c8fd3d9..ce9b161 100644 --- a/js/lib/ext.core.Sanitizer.js +++ b/js/lib/ext.core.Sanitizer.js @@ -551,7 +551,12 @@ // HTML 5 section 4.6 'bdi' : common, - 'wbr' : [ 'id', 'class', 'title', 'style' ] + 'wbr' : [ 'id', 'class', 'title', 'style' ], + + // HTML5 elements, defined by http://www.whatwg.org/html/ + 'data': common.concat(['value']), + 'time': common.concat(['datetime']), + 'mark': common }; } diff --git a/js/lib/mediawiki.wikitext.constants.js b/js/lib/mediawiki.wikitext.constants.js index 7fea8c1..0a1cd1f 100644 --- a/js/lib/mediawiki.wikitext.constants.js +++ b/js/lib/mediawiki.wikitext.constants.js @@ -71,19 +71,20 @@ 'ABBR', 'B', 'BDI', 'BDO', 'BIG', 'BLOCKQUOTE', 'BR', 'CAPTION', 'CENTER', 'CITE', 'CODE', - 'DD', 'DEL', 'DFN', 'DIV', 'DL', 'DT', + 'DATA', 'DD', 'DEL', 'DFN', 'DIV', 'DL', 'DT', 'EM', 'FONT', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'HR', 'I', 'INS', 'KBD', 'LI', + 'MARK', 'OL', 'P', 'PRE', 'Q', 'RB', 'RP', 'RT', 'RUBY', 'S', 'SAMP', 'SMALL', 'SPAN', 'STRIKE', 'STRONG', 'SUB', 'SUP', - 'TABLE', 'TD', 'TH', 'TR', 'TT', + 'TABLE', 'TD', 'TH', 'TIME', 'TR', 'TT', 'U', 'UL', 'WBR' ]) }, diff --git a/js/tests/parserTests.txt b/js/tests/parserTests.txt index 634cc80..fa06361 100644 --- a/js/tests/parserTests.txt +++ b/js/tests/parserTests.txt @@ -11365,6 +11365,20 @@ </p> !! end +# TODO: generalize to PHP parser? +!! test +HTML5 tags +!! options +parsoid +!! input +<data value="5">five</data> +<time datetime="2000-01-01T00:00Z">The new millenium started</time> +<mark>This highlighted text</mark> +!! result +<p><data value="5">five</data> +<time datetime="2000-01-01T00:00Z">The new millenium started</time> +<mark>This highlighted text</mark></p> +!! end ### ### Nesting tests (see bug 41545, 50604, 51081) -- To view, visit https://gerrit.wikimedia.org/r/99011 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I668ad89aad9f6c798645d081b5971719175b7ea5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Parsoid Gerrit-Branch: master Gerrit-Owner: GWicke <gwi...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits