Support » Plugin: Post Expirator » It removes Embedded code

  • Resolved Alicia


    I run a giveaway and coupon database site and depend heavily upon this plug-in to expire dead giveaways and coupons.

    I have tried using RaffleCopter and GiveawayTools and one other app that requires you to embed a Javascript based form on to a blog post. I will copy and paste the form exactly and the form would just disappear. When I looked at the raw code, the script type=”text/javascript” tag is being stripped from the code, for any of these apps.

    I deactivated every plug-in, and the problem went away. I reactivated them individually until the problem returned, and it turned out to be this one. I then reactivated every plugin except this one, and the problem did not return.

    Can someone please help me with this?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Aaron Axelsen


    The plugin does not do anything to specifically remove javascript, and that doesn’t make sense either. If you provide a block of sample code I can test it and see – are you saying it is being removed at expire time or at post time?

    At post time – or sometimes a few minutes after post time. Whenever I click publish on any post that uses javascript, something is stripping out the javascript tags. I disabled every plug-in I had and re-enabled them one at a time. It turned out to be this one. Then, I re-enabled every plug-in except this and the problem went away. The issue only occurs when this plug-in is enabled.

    So, here is a post I was having a problem with
    The entry form for the giveaway is on the page.

    The embed code is supposed to look like this:
    <div id="pgt516627321pgt" class="pgtContainpgt"><a href="" rel="nofollow" target="_BLANK2">Entry</a><script type="text/javascript" src="//"></script><a href="" rel="nofollow" target="_BLANK2">-Form</a></div>

    However, when Post Expirator is active, it looks like this:
    <div id="pgt516627321pgt" class="pgtContainpgt"><a href="" rel="nofollow" target="_BLANK2">Entry</a><a href="" rel="nofollow" target="_BLANK2">-Form</a></div>

    It does the exact same thing with RaffleCopter as well, and one other giveaway platform that required embedding javascript code. It also has done it with a couple of my sponsors that have a javascript embed I place in posts about their products.

    Have you been able to look into this?

    Plugin Author Aaron Axelsen


    Briefly – I can confirm the issue and it is related to kses. I will need to think through the best way to move forward with this one.

    I’m having the exact same problem as SexyDawnT. Whenever a post expires it removes the following code in every post:

    <script type="text/javascript"></script>
    <script type="text/javascript"

    Any suggestions how can I avoid this from happening? I don’t want to uninstall it since this plugin is very helpful and does exactly what I need.

    Plugin Author Aaron Axelsen


    I believe I have a fix for this that will be in the 2.0 release (waiting to confirm its the best way to handle it) – hope to have that out in the not to distance future.

    Thanks so much! I’ve been using a different plug-in, but it has serious problems and the dev abandoned the project a long time ago. I will definitely be switching back once yours is up and running. Thank you for all the help.

    Plugin Author Aaron Axelsen


Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘It removes Embedded code’ is closed to new replies.