wp_register_script - & char is converted and breaks code (2 posts)

  1. Marlus Araujo
    Posted 5 years ago #

    Hello there,

    I'm having trouble when trying to load the script bellow with wp_register_script:

    <script type='text/javascript' src='http://openx.mysite.com/spcjs.php?id=1&block=1'></script>

    The & char is converted in & #038; and breaks the vars passed to generate script
    (I'm putting a space between &-# so it's rendered here)

    I've tryied both & and & amp;

    wp_register_script('openx', htmlspecialchars("http://openx.mysite.com/spcjs.php?id=1&block=1"), false, '1.0');

    but I always get & #038;

    <script type='text/javascript' src='http://openx.mysite.com/spcjs.php?id=1& #038;block=1'></script>

    How can I load scripts with these extra vars?

    One note, all my php files are utf-8 encoded

    Thanks in advance!

  2. lifeofguenter
    Posted 4 years ago #

    same problem here

Topic Closed

This topic has been closed to new replies.

About this Topic