Whitelist the <wbr> element.

Bug: 52468
Change-Id: If4a4882155888606c960237be0fbe7933a85c5f9
This commit is contained in:
Daniel Friesen 2013-05-12 20:24:08 -07:00 committed by Release notes rebase bot
parent 6be9365cee
commit ff74113bea
4 changed files with 9 additions and 5 deletions

View file

@ -173,6 +173,7 @@ production.
specific purge.
* (bug 25931) Add Special:RandomInCategory.
* mediawiki.util: addPortletLink now supports passing a jQuery object as nextnode.
* <wbr> can now be used inside WikiText.
=== Bug fixes in 1.22 ===
* Disable Special:PasswordReset when $wgEnableEmail is false. Previously one

View file

@ -385,10 +385,10 @@ class Sanitizer {
'kbd', 'samp', 'data', 'time', 'mark'
);
$htmlsingle = array(
'br', 'hr', 'li', 'dt', 'dd'
'br', 'wbr', 'hr', 'li', 'dt', 'dd'
);
$htmlsingleonly = array( # Elements that cannot have close tags
'br', 'hr'
'br', 'wbr', 'hr'
);
if ( $wgAllowMicrodataAttributes ) {
$htmlsingle[] = $htmlsingleonly[] = 'meta';
@ -1536,6 +1536,9 @@ class Sanitizer {
# 9.3.2
'br' => array( 'id', 'class', 'title', 'style', 'clear' ),
# http://www.whatwg.org/html/text-level-semantics.html#the-wbr-element
'wbr' => array( 'id', 'class', 'title', 'style' ),
# 9.3.4
'pre' => array_merge( $common, array( 'width' ) ),

View file

@ -18,5 +18,5 @@ fix-backslash: no
fix-uri: no
# Don't strip html5 elements we support
# html-{meta,link} is a hack we use to prevent Tidy from stripping <meta> and <link> used in the body for Microdata
new-empty-tags: html-meta, html-link
new-empty-tags: html-meta, html-link, wbr
new-inline-tags: video, audio, source, track, bdi, data, time, mark

View file

@ -866,11 +866,11 @@ Non-html5 tags should be accepted
!! end
!! test
<wbr> isn't (yet) valid wikitext (bug 52468)
<wbr> is valid wikitext (bug 52468)
!! input
<wbr>
!! result
<p>&lt;wbr&gt;
<p><wbr />
</p>
!! end