2

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?

1 Answer 1

1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.