title: How to pass % in a URL query string?
body: <p>I am trying to pass a string via HTTP request which has one of the character as <code>%</code> in the URL query string. </p>
  
  <pre><code>url = url + "?q=" + str + "&amp;block=" + block;  // str contains the '%' character
  </code></pre>
  
  <p>But on the ColdFusion page where I'm sending this information is returning following error:</p>
  
  <blockquote>
    <p>Element Q is undefined in URL.</p>
  </blockquote>
  
  <p>How can I encode the <code>%</code> sign in a URL?</p>