Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Oct 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation How to Keep "&" in Generated URLs

    I have the following script:

    Code:
    mytext = mytext.replace(/(\[\[(.+)\]\])/gi,"(<script src='http://www.mysite.com/mysite?Module=mymodule&Variable=$2&Output=JS'>)");
    When I view the Generated Source, using Firefox Webdev plugin, it shows that the ampersands are replaced with "&amp;", which causes the script to break.

    I have tried the following to no avail:
    1. Replacing the &'s with &amp;
    2. Replacing the &'s with %26
    3. Replacing the &'s with \u206
    4. Placing the script in an external file
    5. Using CDATA and comments
    6. Escaping the &'s with \ before them
    7. And even unencoding them with +unencode('%26')+


    Does anyone know how I can keep the &'s in the URL?

    Thanks in advance!!!

  • #2
    New to the CF scene
    Join Date
    Oct 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Update: I also tried including in the header with CDATA and it still didn't work.

    Any other ideas?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •