title: Javascript strings with symbol '\'
body: <p>I am having difficulties handling symbol \ in javascript. Strings seems to ignore it, for example <code>alert('a\b')</code> would only alert <code>a</code>.</p>
  
  <p>My goal is to write following function which would give me latex image:</p>
  
  <pre><code>function getLatexImage(tex)
  {
      return 'http://chart.apis.google.com/chart?cht=tx&amp;chl=' + tex;
  }
  </code></pre>
  
  <p>However calling <code>getLatexImage('\frac{a}{b}')</code> gives me: <code>"http://chart.apis.google.com/chart?cht=tx&amp;chl=rac{a}{b}"</code></p>
  
  <p><code>\f</code> is being ignored.</p>
  
  <p>Any suggestions?</p>