title: jQuery autocomplete with multiple line breaks
body: <p>I am using jQuery autocomplete to fill out multiple fields when an item is selected. Everything works well unless there is a page break in any of the data. So, here is the jquery example code:</p>
  
  <pre><code>var equipment = [
  { id: "3",
    label: "Custom Name 3",
    text: "Some text without line break"
  },
  { id: "4",
    label: "Custom 4",
    text: "Some text WITH
  line break"
  }
  ];
  
  $( "#equipment" ).autocomplete({
        minLength: 0,
        source: equipment,
        focus: function( event, ui ) {
          $( "#equipment" ).val( ui.item.label );
          return false;
        },
        select: function( event, ui ) {
          $( "#equipment" ).val( ui.item.label );
          $( "#id" ).val( ui.item.id );
          $( "#text" ).html( ui.item.text ).text();
          return false;
        }
  })
  </code></pre>
  
  <p>And the html:</p>
  
  <pre><code>&lt;input id="equipment" name="name"&gt;
  &lt;textarea id="text" name="text" cols="45" rows="5"&gt;&lt;/textarea&gt;
  </code></pre>
  
  <p>Due to the line break in the 'text', I get the "Uncaught SyntaxError: Invalid or unexpected token" in that line. I tried using jQuery.data with the same outcome.</p>
  
  <p>How can I fix this error without getting rid of all line breaks?</p>