Support » Plugin: Ads by WPQUADS - Best Ads & Adsense Ads Plugin for WP & AMP » Ads are being displayed as raw code

  • Resolved cubbysaquatics

    (@cubbysaquatics)


    So this morning I set up 10 eBay Partner Network ads, using plain text. At first everything looked great. I could see the ads. Then they suddenly stopped displaying correctly. Instead of seeing the ads, I am now seeing raw code in their place. I tried viewing the pages on my phone as well as on my desktop, and both are showing the improperly displayed ads. I cleared my caches and still the same. My desktop is a Mac Mini, using the latest version of Chrome. I also tried viewing the ads with Safari, and the result was the same. My phone is an Android Galaxy S7, using Chrome.

    Could I have turned on/off some setting to do this?

    The only related changes that I had made was to try pasting the “<!–RndAds–>” tag into a basic text widget. When I saw that it didn’t work, I deleted the widget. The other change I did was to uncheck the option to add the ads to the bottom of posts/pages. Other than those I haven’t made any changes to the settings or anything that I can think of. I tried deactivating and reactivating the plugin, but no change. I made sure that my ad-blocker is not active on my site.

    I have included a link to a test page with the “<!–RndAds–>” tag in use. You should be able to see that raw code is displayed instead of the ad. I have disabled the ads on all my other pages and posts.

    Thanks in advance.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter cubbysaquatics

    (@cubbysaquatics)

    Update:

    Well, I partially figured it out. For some reason, a “\” character was being removed from the code in two places. Why/how I do not know, as it is not the first or last character, so it’s not like I missed them when selecting the code block and pasting into the plugin.

    In the section: document.write(‘\x3Cscript type=”text/javascript” charset=”utf-8″ … the “\” before “x3Cscript” was dropped. It was also dropped near the end in the section (Math.floor(Math.random() * 10000000 )) + ‘”>\x3C/script>’ );

    Again, I don’t know why this has happened, but I have retyped it into all of my ads. Hopefully it will stay there. If not, I may be switching to a different plugin.

    @cubbysaquatics

    Hi,

    if you like to send me the complete ad code via mail i can check if it’s valid code and why some parts of it became removed. Usually this should not happen.

    You can reach me support [at] wpquads.com

    Cheers
    René

    Thread Starter cubbysaquatics

    (@cubbysaquatics)

    Thanks René,

    I will send the code snippets via mail.

    Now, I can see by looking at the code block in the plugin window (as it is currently) that the code should not work, because it does not contain the necessary “\” symbols, but the ads are currently displaying properly. Perhaps the reason why the code looks wrong, but the ads are still working is because I would need to “Save Changes” before the erroneous code would be implemented. Does that make sense? I know that in the window for writing posts/pages, if you switch from text edit mode to the regular edit mode or vice versa, wordpress will automatically reformat the html code for better syntax. Maybe that is something that is happening here within the plugin?

    Thanks again for looking into it,
    David

    Hi David,

    it seems the sanitization function is removing backslash characters. This can be bypassed by just writing two backslash characters in a row. This escapes the backslash character and prevent it from beeing removed. E.g.

    \x3Cscript converts to \\x3Cscript

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Ads are being displayed as raw code’ is closed to new replies.