WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am needing to remove the & that seems to be replacing my & on my page code.

My original code looked like this:

$.get("../form/master.php?called=CAP&captcha="+$("#captcha_txt").val(), {}, function(response){

and now, looking at the source code to the page that loads that within wordpress:

$.get("../form/master.php?called=CAP&captcha="+$("#captcha_txt").val(), {}, function(response){

What can i do in order for it not to replace my & within my JS code?

share|improve this question
How do you add this code to your posts? – toscho Apr 20 '13 at 19:12
Just placing it inside <script></script> – StealthRT Apr 20 '13 at 19:13
Do your put this code in a template, or do you use wp_enqueue_script()? – toscho Apr 20 '13 at 19:14
Inside the WP editor (html). I have the plugin Toggle wpautop – StealthRT Apr 20 '13 at 19:15

I ended up doing this and it works:

var data = {
    called: 'CAP',
    captcha: $("#captcha_txt").val()

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.