Page MenuHomePhabricator

Add HTML 5 semantic elements 'details' and 'summary' to Sanitizer whitelist
Open, LowestPublic


The HTML5 elements <details> and <summary> (used for making expandable content) are not being allowed by Mediawiki. (This might be only on Wikimedia wikis.)



Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 11:28 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz29118.
bzimport added a subscriber: Unknown Object (MLST).
brion added a comment.May 23 2011, 8:44 PM

Updated bug summary & fields to clarify this is an enhancement request for supporting HTML 5 draft elements in wiki body text:

These would presumably be nice ways to implement various sorts of hidable sections, though user-agent support is likely to be lacking or inconsistent at this stage.

I would not recommend adding any explicit support at this stage, but it should be taken a look at some day.

brion added a comment.May 23 2011, 8:45 PM

Going to resolve this as LATER; when UA support is more consistent reopen w/ current info. (The things we do use like <video> are easier to detect and define, and don't duplicate behavior we already deal with w/ JavaScript and some standard class names.)

Many wikis have methods of creating expandable content using javascript which could be replaced by details/summary for browsers that support it. What would be the downsides of having those only use the javascript method for browsers that don't support <details> and <summary>?

Note: <details> and <summary> is supported in Google Chrome.

Suzukaze-c added a subscriber: Suzukaze-c.EditedJun 30 2018, 5:05 AM

It is now 2018. Is acceptable user agent support?

(Was thinking about en.wiktionary's frequent use of [show]/[hide]...)

Suzukaze-c reopened this task as Open.Feb 10 2020, 5:38 PM
Suzukaze-c added a subscriber: brion.

It is now 2020. Reopening per the second comment by @brion.

brion added a comment.Feb 10 2020, 7:12 PM

Neat! We should probably confirm the behavior is consistent, predictable, and either falls back cleanly or can be emulated sanely (eg in IE 11 if it doesn't support it). Also double check that neither tag is used as an extension. Then I probably have no further objection. :)

brion added a comment.Feb 10 2020, 7:14 PM

From caniuse it looks like IE and old Edge are the holdouts (new Chromium based edge supports it, as well as reasonably current versions of other browsers)

Volker_E updated the task description. (Show Details)Apr 3 2020, 1:56 AM
Volker_E removed a subscriber: wikibugs-l-list.
Nirmos added a subscriber: Nirmos.Jun 30 2020, 11:31 AM