title: JavaScript pass array of strings issue
body: <p>From my play! framework view I pass an array of strings to my js method like:</p>
  
  <pre><code> &lt;script type="text/javascript"&gt;
          buildMapWithMarkers('map_canvas', ${hotelsLat}, ${hotelsLng}, ${hotelsNames}), 'false'); 
      &lt;/script&gt;
  </code></pre>
  
  <p>The problem is that sometimes <code>hotelsNames</code> contains strings having <code>'</code> or <code>&amp;</code> eg <code>Hyatt's Green</code>:</p>
  
  <pre><code>buildMapWithMarkers('map_canvas', [43.3484420, 43.614980, 43.549480], [-97.4318550, -97.61660500000001, -97.5021910], [Sportsmans Acres Pheasant Hunts, Hyatt's Green Acres, Guest Room Motel]), 'false'); 
  </code></pre>
  
  <p>so it throws some exceptions:</p>
  
  <p><code>Uncaught SyntaxError: Unexpected identifier</code></p>
  
  <p>Can you please help me how to encode this (in view or controller)?</p>
  
  <p>I tried: <code>encodeURIComponent(${hotelsNames})</code> but does not work.</p>