It seems you are working on the wrong end.
Try sanitizing the user input, for instance by means of sanitize_text_field
, not the shortcode output.
Related Posts:
- Conditionally Loading JavaScript/CSS for Shortcodes
- Pass boolean value in shortcode
- How to add ‘class’ attribute into shortcode [audio]?
- Make shortcode work with nested double quotes
- Automatically add this attribute to the gallery shortcode
- How to handle valueless attributes in shortcodes?
- Get multiple shortcode attribute values
- wpautop() when shortcode attributes are on new lines break args array
- Remove width and height attributes from [gallery] output
- Add attribute to existing Shortcode
- Shortcode displays only default attribute values
- Extending Shortcode attributes
- Remove HTML content if attribute is not set / variable attributes
- Global, network-wide shortcodes or text replace functions
- getting values from a shortcode with an include
- Why are Shortcodes Disabled in Widgets by Default?
- Add attribute to shortcode dynamically
- Replace / Remove Shortcode after 1st run / post
- Caption shortcodes not including caption as attribute
- Conditionally Loading JavaScript/CSS for Shortcodes
- WordPress messes up with data attributes in shortcode output
- Check if CTP category taxonomy is set in shortcode
- Passing variable in nested shortcodes
- How to use a nested shortcode to render the value of an attribute in parent shortcode
- Which wordpress function is the caption shortcode linked to?
- Toggle Shortcode Sanitize Title
- How to process a single attribute in a SQL request twice times?
- shortcode atts not working
- Second attribute of shortcode is not changing why?
- Replace custom gallery shortcode with default gallery shortcode
- Shortcode Attribute contains clone of all shortcode attributes
- How can I define the output of shortcode attribute value?
- Remove width and height attributes from [gallery] output
- Making a Shortcode [NEXT] and [PREVIOUS] to place into specific posts for post navigation
- Allowing shortcodes inside attributes
- Can I create customizer setting that can handle plugin shortcode?
- TinyMCE popup windows using WP functions
- How to display the comment_form with a shortcode while removing it from its default position?
- How to use shortcodes on a widget sidebar when doing an ajax call?
- Add_shortcode as a Class to pass arguments to a function
- Error: The Content Area Was Not Found in Your Page
- How do I require a file in a shortcode?
- Custom Shortcodes Giving error on development site
- Shortcode does not work, changes html order
- Using API to generate short link
- How do you pass parameters TO a shortcode?
- How to enable shortcodes in text retrieved from get_theme_mod
- Video shortcode – autoplay all videos
- passing parameters to do action from shortcode to wp_footer
- Shortcode not working on static front page
- MathJax inside shortcode
- How to add class or id to shortcode HTML elements?
- Change WordPress Shortcode added in to post
- Changing the title tag from a shortcode
- WordPress wpautop/shortcode generating invalid markup
- Shortcodes attributes defaults
- Remove ‘p’ tags around shortcodes and ‘img’
- Forcing max-width for image captions
- WordPress Short code with additional parameter
- Replace shortcode in substring
- Creating a short code with php inside
- How do I apply style to each category of a list?
- Shortcode output appearing at the top of the page only [duplicate]
- Is it possible to modify the header with a content shortcode?
- PHP/WordPress — How do I check if Shortcode returns content?
- Add shortcode with open close function
- Shortcode outputting at top of content
- Will a shortcode placed inside a paragraph tag still be valid?
- Create Widget or Enable Shortcodes in Sidebar
- Shortcode Strategy
- Enclosing Shortcode is acting like self-closing
- How do I define and register a shortcode function in a namespaced functions.php file?
- Change user meta value with shortcode
- WordPress User ID as Shortcode
- Duplicated content with custom shortcode
- shortcode – multiple instances of same parameter name in one shortcode instance
- find shortcode inside content of post
- WordPress Short code for List style
- How can I replace content on site generated from plugin without changing plugin
- How can i strip shortcode from HTML title tag?
- Need help with creating a simple shortcode
- i want to show a modal when user lands on home page very first time
- Having trouble creating two shortcodes, one for logged in user and one for visitors
- Gutenberg running code only available in front end within shortcode
- Insert HTML in content property and render it using shortcodes
- Logout user if click on a custom page link
- Shortcode Attribute not defined
- WP_User_Query Search Multiple Keywords from a Multi-Select Field?
- Load next post by ID on a single page
- Plugin Shortcode value in post
- Add catagory attribute to custom shortcode
- Separating Custom Template logic
- woocommerce Product shortcode create [closed]
- Help with Shortcode Functionality
- Shortcode Site include in a other
- How do write this type shortcode? [closed]
- WordPress functions.php shortcode is not working [closed]
- My first WordPress shortcode just returning []
- How to reuse php templates as shortcodes?
- Shortcode attributes from meta query variables