Follow-up: Auto removal of links in Cookie Notice Content
-
Hello WPeka,
I would like to let you know that after the last update (version 2.3.8) a previously resolved issue has returned.
Plugin version 2.2.4 resolved the issue about HTML link tags getting removed from the Cookie Notice in the frontend. However, it seems that issue has returned.
Here is an example “GDPR Message”:
<a >Example.com</a>, uses cookies in order to blah blah blah...
Unfortunately, the plugin strips off the link tag:
<a ></a>
In continuation to my previously proposed fix, a good possible resolution eligible for the current version could be the following:
File: gdpr-cookie-consent/public/templates/skins/default.php
Line 31:Current code:
<div class="group-description" tabindex="0"><p class="gdpr"><?php echo esc_html( $the_options['gdpr_str'], '<a><br><em><strong><span><p><i><img><b><div><label>' ); ?>
Suggested modification:
<div class="group-description" tabindex="0"><p class="gdpr"><?php echo strip_tags( $the_options['gdpr_str'], '<a><br><em><strong><span><p><i><img><b><div><label>' ); ?>
This again uses the function the PHP function
strip_tags()
instead ofesc_html()
that escapes all HTML tags in the frontend.I would be grateful if you could again implement the proposed resolution or take any other action that fixes the issue in the next update to allow basic HTML markup the in consent message.
Best regards,
GeorgeThe page I need help with: [log in to see the link]
- The topic ‘Follow-up: Auto removal of links in Cookie Notice Content’ is closed to new replies.