title: javascript error with carriage return and newline
body: <p>I have following string in Java: </p>
  
  <pre><code>"this is text1\r\nthis is text2\r\nthis is text3"
  </code></pre>
  
  <p>I am replacing <code>\r\n</code> with <code>&lt;br/&gt;</code> as follows: </p>
  
  <pre><code>String temp = "this is  text1\r\nthis is text2\r\nthis is text3"
  temp = temp.replaceAll("[\r\n]+", "&lt;br/&gt;");
  </code></pre>
  
  <p>which produces the following string: <code>"is text1 this is text2 this is text3"</code></p>
  
  <p>now, I want to send it to JavaScript element as follows: </p>
  
  <pre><code>var desc_str = "&lt;%=temp%&gt;";
  document.getElementById('proc_desc').value = desc_str;
  </code></pre>
  
  <p>The output from Java is fine, but after passing to HTML element, I am getting JavaScript error "unterminated String literal", I am not finding the clue, please help.</p>