Shortcodes within the sidebar text/html widget: How to preserve the raw HTML output of the shortcode?

by Blackbam   Last Updated May 15, 2019 17:08 PM

WordPress 5.2 destroys structured data by adding rel="noopener noreferrer" to widget output (also to shortcodes): How to display the shortcode output without code change?

This feature was added in 5.2: https://core.trac.wordpress.org/ticket/43280

Basically there is nothing wrong with adding rel="noopener noreferrer" to <a href="..." target="_blank"></a> links, as it will protect from malicious comments or bad authors for instance.

Anyway I have a shortcode from some plugin which is generating structured data (rating stars) for a website and embedded via shortcode. Adding the rel-Attribute there breaks the structured data (as confirmed by https://search.google.com/structured-data/testing-tool/u/0/?hl=de).

How can I use the shortcode in a sidebar widget with the code preserved?



Related Questions



How to check if a shortcode is blank?

Updated October 03, 2018 22:08 PM


Wordpress stripping out BR tags, need assistance

Updated July 21, 2015 13:03 PM

Is shortcode_unautop() broken?

Updated August 23, 2015 18:03 PM