title: illegal character in jsonp response
body: <p>Hi i am doing an exercise where I am trying to scrape content of nytimes website using javascript/ajax.</p>
  
  <p>In order to send cross domain ajax request I am using a proxy server that returns me jsonp response with nytimes website content.</p>
  
  <p>But since that html content has some charaters (single quotes) which throws "Illegal Character" error.</p>
  
  <pre><code>&lt;script type="text/javascript" src="http://json-proxy.jgate.de/?callback=callback&amp;url=http%3A%2F%2Fwww.nytimes.com%2F"&gt;&lt;/script&gt;
  &lt;script&gt;
  function callback(obj) {
   alert(obj);
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>What could be a possible solution to this error?
  And what are other alternatives to solve this?</p>
  
  <p>Thanks</p>
  
  <p>(p.s. This question was asked to one my friends in his interview)</p>
  
  <p>Update: Here is yahoo pipes link for the same.
  <a href="http://pipes.yahoo.com/pipes/pipe.run?_id=748e37c218ed0747d0b868ae8eafefa6&amp;_render=json" rel="nofollow noreferrer">http://pipes.yahoo.com/pipes/pipe.run?_id=748e37c218ed0747d0b868ae8eafefa6&amp;_render=json</a></p>