It seems the function is broken. The issue is in trac: https://core.trac.wordpress.org/ticket/14050
I am using this to solve the problem temporarily: https://core.trac.wordpress.org/attachment/ticket/14050/plugin.php . This code still fails some of the tests used, but it completely resolves the issue I described, so I will use it unless I find something practical that it breaks.
Related Posts:
- Remove wpautop from shortcode content / remove whitespace in buffering
- wpautop() when shortcode attributes are on new lines break args array
- Why does WP not like my container?
- Raw output (preventing wpautop)
- Remove empty p-Tags in Shortcode content before non p-Tags
- Remove wpautop from specific shortcodes only
- basic shortcode – Why 1st paragraph not wrapped in p tag, but 2nd is
- Extra paragraph tags in an enclosing shortcode
- WordPress wpautop/shortcode generating invalid markup
- Wrap Shortcodes and wpautop
- Disable wpautop on Shortcode attributes
- Remove some tags from shortcodes output? Trying to fix autop
- Wpautop stops working after get_the_excerpt
- Can I prevent wordpress adding and tags to autoembeds
- How can I remove the wp_autop filter from a shortcode block in a block theme page template (twenty twenty-three)?
- shortcode causes broken paragraph tags
- Conditionally Loading JavaScript/CSS for Shortcodes
- Show shortcode without executing it
- How to create a shortcode with 1 parameter (atts)
- shortcodes output before content [duplicate]
- How does a shortcode work?
- Run visual composer code in php page
- Remove wptexturize from a shortcode?
- Using shortcode in Post title
- WordPress adds br in between my shortcode
- Shortcodes, HTML tables, and multiple rows
- Audio or playlist shortcode condition according to the amount of files on attachment page
- Does a shortcode with a single attribute have to use an array?
- WP_enqueue_script inside shortcode?
- Shortcode to Gutenberg-block: additional text on front-end and conditional display
- template_redirect to accompany with a shortcode
- How navigation works in custom loop within shortcode?
- How to check if this is the nth instance of a given shortcode in a post
- conditional shortcode not working
- Correct way to pass information between seperate shortcode functions
- Extending Shortcode attributes
- Shortcode But Without The Equals Sign?
- Shortcode output is screwed up when arrow symbol “
- How best to apply do_shortcode in media.php for captions
- If numberposts = -1 offset won’t work
- shortcodes between square and curly brackets
- Shortcode are not working in Option tree textarea
- Searching in shortcode contents
- Applying filters to the_content() to separate content if any `add_shortcode()` is found?
- Wp_localize_script from Shortcode [closed]
- Localization inside shortcode not working
- Font Awesome Icons Won’t Work
- How to Get a part of URL and put in shortcode?
- Get shortcode attribute outside of WordPress
- Overriding shortcode $atts for featured products
- How to create a shortcode for embedding pdf in iframe?
- Woocommerce, ordering products by default on shortcode pages
- detect when shortcode ran for the last time
- How can a shortcode can take the place of the featured image in a post?
- Shortcode for Twitter Bootstrap Collapse
- Is there any inherent difference between add_filter() and add_shortcode() for modifying [caption]?
- get_shortcode_regex() only matches first shortcode
- Looking for a way to include/embed text from a file on a page so that the short codes are processed
- Different uniqid when calld in wp_localize_script and shortcode
- How do I debug a short code?
- Gravity forms customize field markup for the same form appearing in different places
- How to type shortcode-like text in WordPress TinyMCE visual editor?
- Does registering multiple shortcodes impact performance?
- Gallery shortcode – change link file image size? (not using default fullsize image)
- How can I hide the Permalink/Shortlink for certain user logged in Users of a certain level?
- How to force that styles are enqueued in the header?
- add action only if gallery shortcode attribute is equal to?
- How To Conditionally Include A Short Code Depending On The HTTP_REFERER [closed]
- Shortcode for order number [closed]
- Create shortcode in WordPress, using one variable in 3 functions?
- Edit shortcode in post content programatically
- Adding javascript actions to words in post content
- How to change to local video player on shortcode ultimate to video.js?
- Make a Shortcode load after Post/Page Content?
- Adding JS in header when using wp_enqueue_script in a shortcode
- How to dynamically add wordpress shortcodes
- shortcode with conditional results if logged in
- Can I pass parameters to the add_shortcode() function?
- how can I change my font color for Shortcode [closed]
- Create a function to display HTML/data based on site admins role?
- AJAX and do_shortcode
- How can I extract a word from page/post URL using shortcodes
- Custom user registration shortcode – redirect header issue
- Call Shortcode on wp_footer
- Adding shortcode of “Random Content” Plugin in the post after the title
- Variable inside shortcode or shortcode inside shortcode
- From a shortcode I want to pass a value to display a different page
- How to use code in an editor block?
- Hide password protected dynamic content in templates via shortcode
- Shortcode callback not called
- Shortcode Attribute contains clone of all shortcode attributes
- Custom Login in Shortcode got error
- Created a shortcode, using it twice (but differently) on a page but its just outputting the same one twice
- Access Shortcode in ajax code?
- Automate post creation in wordpress
- How to print [embed] code in wordpress [duplicate]
- Shortcode append to the the_content()
- How to exclude some cats from wp_list_categories using shortcut
- How can I create a shortcode that shows a list of categories on the single product page?
- Array to String Conversion warning in shortcode