Thanks to @fuxia, adding data
to allowed protocols fixes the problem and I can happily use return
.
add_filter( 'kses_allowed_protocols', function ( $protocols ) {
$protocols[] = 'data';
return $protocols;
});
Related Posts:
- Custom shortcode being executed when saving page in wp-admin
- Change appearance of shortcode text inside editor
- Shortcode outputs at the top of the_content
- Combining shortcode and get_template_part
- Escaping quotes from shortcode attributes
- How to get current page title inside a page itself in a shortcode and in page content
- Short code to display a loop
- shortcode inside another shortcode
- How can I just get content inside a shortcode or just outside
- Custom Shortcode AJAX 400 Bad Request
- WordPress core responsive video not working with shortcode
- conditional shortcode not working
- Ajax not returning anything on form submit
- Wraping $content into link with shortcodes
- Simple contact form with field validation
- other shortcodes in Contact form 7 MAILS [closed]
- Remove empty p-Tags in Shortcode content before non p-Tags
- What is a short code?
- Using do_shortcode with variables?
- Remove hyperlink on gallery shortcode
- Wrap shortcode inside custom block
- Instagram URL is converted into oEmbed
- Shortcode with no attribute but has value
- Remove wpautop from specific shortcodes only
- basic shortcode – Why 1st paragraph not wrapped in p tag, but 2nd is
- unwanted P tags in shortcode, delay wpautop not working
- Shortcodes and a list of IDs?
- Shortcode adding plugin output before post, instead of inline [duplicate]
- How to build a shortcode which can insert a query string into a DB table
- What is the Correct way to pass parameters in function
- Shortcode – Getting Categories appears on top of website
- Visual Composer integration [closed]
- How to Modify WordPress Default Image Gallery Shortcode
- Include tags in the body of a post
- no content after shortcode
- Button Shortcode
- Remove shortcodes that are different (but same pattern) in each post
- Place a URL parameter value inside a WordPress short code
- Shortcodes in excerpts returning empty string
- Scripts for shortcode: concatenate or load separately? [closed]
- Print shortcode in defined area
- WordPress shortcodes are not working
- How to use/enable Pagination?
- Wrap Shortcodes and wpautop
- Placing tags on wordpress visual editor using shortcodes
- Shortcode called twice
- Favorite websites with shortened hyperlinks
- Best way to find all shortcodes that come with WordPress
- Using Variables in Shortcodes
- Default Attributes in Shortcode Not Working
- Replacement for gallery_shortcode function not taking all attributes
- Add JS in footer via shortcode?
- Shortcode syntax errors
- Passing variable in nested shortcodes
- Shortcode Always Displays Default Attribute Value
- how can i pass this attribute in this shortcode?
- Do shortcode in template file
- How do I fit a function inside an opening and closing do_shortcode
- How to make shortcode which returns HTML?
- Add shortcode within the_content()
- How to create a custom shortcode for custom login form?
- Enclosing Shortcode not working in a Template
- Set redirect for need login
- pass complex json as shortcode parameter
- Image Caption Shortcode Broken upon update
- Shortcode not working in CPT taxonomy
- How to include shortcodes and pdfs in WordPress search without plugin?
- How to embeded shortcode for another website
- To know whether insert shortcode in custom meta box
- Gutenberg Shortcode will turn html to html entity
- Need help in setting up a transient using API Key and if possible updating it in the ACF field
- the_content() not showing the content in good order (with a shortcode)
- Execute shortcode in backend
- Shortcodes not working in custom page
- Get label in user meta query
- How to Enable embedding WordPress default gallery in comments?
- Print shortcode according to site language
- Remove a short code and update it’s content (AJAX)
- create a shortcode for embedding google map in a page
- Timber – don’t display shortcode
- Use ACF array values in shortcode
- How to fix transparency in product sliders / featured products on home page?
- php in a shortcode
- Pull in excerpt with shortcode
- Short code format for cat tagging when posting from email
- WordPress core playlist function not showing artist and album info
- Problem in creating a shortcode form custom post type slider
- Which method to use when deleting posts from the front-end
- short code is not working in in custom wordpress theme it’s only working in default theme
- add php shortcode in return function
- Gallery Shortcode: using size=”full” doesn’t call the actual thumbnail image size
- loop on page makes shortcode fail
- style css to header for shortcodes
- What does this shortcode do?
- Shortcode leads to white screen [closed]
- How to stop an image link continuing to link adjacent text from a shortcode?
- create shortcodes for posts
- How Do I create a shortcode to dispaly a go to top button on any page or post
- Free Add to Cart Button on WooCommerce with Elementor – No Premium [closed]
- wordpress shortcode url decode non Latin character