It’s not kses
. The culprit is this:
force_balance_tags()
When I remove that, things work. I’m not sure why it’s breaking things, but I’ll look into the source later.
Related Posts:
- Typical wp_kses $allowed
- wp_kses vs wp_strip_all_tags
- Escaping SVG with KSES
- wp_kses_post only removes tags, but not their content
- wp_kses() strips data attributes even if it’s in the allowed list
- Allow html comments with kses
- Why wp_kses() not working for rel, target of link in WordPress
- Any ideas how to allow CSS input to perfectly work in the text area with wp_kses?
- wp_filter_kses allow HTML5 video?
- How to get SimplePie fetch_feed without stripping iframe code?
- Why is wp_kses not keeping style attributes as expected?
- What to use instead of wp_kses() in user output
- how to escape wp_oembed_get for phpcs
- Allowing more elements in comments via functions.php
- What is the difference between strip_tags and wp_filter_nohtml_kses?
- How to allow data:image attribute in src tag during post insert?
- WP Editor strips input placeholder attribute
- Change allowed HTML tags for comments
- Remove all table widths from editor content
- Remove tags from the kses filter
- Accepting certain HTML tags in WP List Table column data
- How to allow internal links using wp_kses filtration
- Quotes being escaped inside wp_editor when saved with wp_kses_post
- Proper use of internationalization
- wp_kses and magic quotes
- HTML Entities displaying improperly as malformed escaped code
- Allow iframes from specific sites?
- wp_kses ignore allowed and allow everything
- Make WordPress process admin group comments using $allowedtags
- How can I remove the kses filters when saving a specific post type ? (it breaks my JSON)
- Is it possible to run wp_kses on all posts?
- I want to allow the use of a data-flw attribute in links in comments
- Add Attribute to p Tag of Post Content
- Only allow site url in text field using wp_kses/wp_filter_nohtml_kses?
- How to allow   with wp_kses()?
- Inline style HTML attribute is being stripped from all elements of a post
- sanitize vimeo embed code?
- Broken kses.php function “wp_kses_named_entities” crashes WordPress
- Whitelist a single SVG for use in post_content
- WordPress post_content gets deleted in cron after wp_update_post
- wp_kses allow checkbox class and checked
- Add Protocol to Custom Menus
- Why is `–` converted into ndash and how can I get rid of it?
- why is kses removing semicolon from inline style?
- Multisite, but wp_kses_allowed_html only for one subsite?