PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

String escaping conflict for "before_widget"

The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page please
If you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.

Hi there,

One of my client's sites was having an issue with some CSS being echoed to the screen above the search widget. I did some digging and it seems that in a recent update the before_widget argument in the widget method of the WOOF_Widget class is now being escaped through the wp_kses_post function, and this is leading to a conflict with the Avada theme/builder  which is trying to insert a <style> tag at the beginning of the before_widget argument that it's being stripped back to plain text and then echoed to the frontend.

I can see that in version 1.2.6.3 of the plugin on line 29 the code didn't have the escaping:

echo $args['before_widget'];

And then in version 1.3.2 which appears to be the most recent, this line has changed to:

echo wp_kses_post(wp_unslash($args['before_widget']));
Is it possible to get this reverted back in a future release? I understand the reason for escaping this argument, however, it breaks compatibility with a popular page builder and possibly other plugins as well, so it would be great if there was a workaround for this.
Thanks,
Cam

Hello

Unfortunately, it's not possible to get this code back.

The only solution is plugin customization.