Using HTML 5 Details/Summary Tag

I just wanted to use the details/summary tag on my webpage. Using the summary tag, I'm able to define what my caption looks like. BUT, as soon as I want to edit the page in the visual editor, wordpress removes the summary tag and the standard 'Details' is shown. Is that a bug, or am I doing anything wrong?

Topic tags html5 Wordpress

Category Web


WordPress filters the markup used in post content as a security measure. This stops people inserting malicious javascript inside comments or posts.

On a non-multisite install, administrators sometimes have the unfiltered html capability allowing them to bypass this, but this is a dangerous feature

In particular, the wp_kses_post function replicates this functionality and maintains the whitelist WP uses.

A more compatible approach would be to use a shortcode. However, if you can do what you need to do within the WP UI, then you should do that, and focus on changing the default markup used via actions/filters, rather than inserting your own by hand

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.