Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script tag are being stripped out on VIP Platform #60

Open
kala725 opened this issue Feb 8, 2017 · 6 comments
Open

Script tag are being stripped out on VIP Platform #60

kala725 opened this issue Feb 8, 2017 · 6 comments

Comments

@kala725
Copy link

kala725 commented Feb 8, 2017

While serving the ad-layers through widgets, script tag is being stripped out, leaving the javascript code to be displayed on the site. How can we fix or is there something I am doing wrong ?

Cause : In plugins/ad-layers/php/class-ad-layers-widget.php , on line no.50 "wp_kses_post" is stripping the <script tag>.

How to resolve that ?

@bcampeau
Copy link
Member

bcampeau commented Feb 8, 2017

There isn't any fixing it. That's quite intentional and non-modifiable behavior for security reasons. Can you explain in more detail what you're trying to do and provide a code snippet? Thanks.

@kala725
Copy link
Author

kala725 commented Feb 9, 2017

Hi @bcampeau ,

Ok, so when I am using the ad-layer in the sidebar using widget, on rendering it shows. (I am pasting the HTML here, so that it is clear. )

<li id="ad_layers_ad_widget-3"><div id="div-gpt-ad-Home Ad 1" class="dfp-ad dfp-HomeAd1" data-google-query-id="xxxxx">

<script > tag missing here. (It has been stripped out as I mentioned earlier because of wp_kses filter)
					if ( "undefined" !== typeof googletag ) {
						googletag.cmd.push( function() { googletag.display("div-gpt-ad-Home Ad 1"); } );
					}

</script> missing, causes the above script code to be shown on the UI of the site.

<div id="xxx_xontainer__" style="border: 0pt none;"><iframe id="xxx_xontainer__" title="3rd party ad content" name="xxx_xontainer__" width="300" height="250" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" srcdoc="" style="border: 0px; vertical-align: bottom;"></iframe></div></div></li>

Hope it is clear now. It is a issue, Meanwhile I am also working on it, and will send a fix, if I can debug it first.

@kala725
Copy link
Author

kala725 commented Feb 9, 2017

Hi @bcampeau : For myself, I have fixed this issue by reverting ad-layers back on the checkout id "aba3ab4". Previously I was on master. Now You can check on why has broke it in master. If I have time, I will also check the changes.

@bcampeau
Copy link
Member

bcampeau commented Feb 9, 2017

To confirm, are you using the widget that's built into the plugin or some other widget?

@kala725
Copy link
Author

kala725 commented Feb 9, 2017 via email

@davisshaver
Copy link
Contributor

@kala725 @bcampeau I believe this was fixed in #67

Although I do not know if this patch has made its way to VIP servers yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants