title: Passing apostrophe to javascript function
body: <p>I am not finding a solution on this one using JavaScript (to utilize localStorage) in a JSP.</p>
  
  <p>Trying to pass something with apostrophe. I have done a <code>.replaceAll()</code> and replaced the <code>'</code> with <code>&amp;#039;</code> and it still passes it as an <code>'</code>.</p>
  
  <p>I have also tried a .split("'") and replaced the apostrophe with:</p>
  
  <pre><code>(\&amp;#039; , &amp;#039; , \', '' , ''' and  '\'')
  </code></pre>
  
  <p>All of these just pass an apostrophe to the function (what I see when I hover over the link) like this:</p>
  
  <pre><code>&lt;a href="saveJob('&lt;%=id%&gt;','&lt;%=title%&gt;','&lt;%=a%&gt;' + '\'' + '&lt;%=b%&gt;','&lt;%=date%&gt;')"&gt;Save job&lt;/a&gt;
  </code></pre>
  
  <p>With <code>a</code> and <code>b</code> being the two split substrings but with no effect. I do notice that spaces are converted into %20, but that's little comfort.  Any other ideas?</p>