title: Losing text after a space setting the value in a new field
body: <p>I am having an odd issue when using Javascript to create a new field. I have button that, when clicked, will create two text fields. I give those text fields a string as a value. However, it is only working correctly if I give it a string with no spaces. If my string contains a space then it makes the value equal to the text before the space occurs.</p>
  
  <pre><code>function nameField() {
    $('#nameArea').html("&lt;br/&gt;First Name:&lt;input type='text' id='fnField' value=" + $('#firstName').text() + "&gt;Last Name:&lt;input type='text' id='lnField' value=" + $('#lastName').text() + "&gt;&lt;/input&gt;&lt;button id='bName' onclick='updateName(fnField.value, lnField.value)'&gt;Save Changes&lt;/button&gt;");
    $('#firstName').html("");
    $('#lastName').html(""); 
  }
  </code></pre>
  
  <p>So for example, if the firstName value is <code>David E</code>, it is currently only putting <code>David</code> in the field as the value.  However, I have used alert and can confirm that <code>$('#firstName').text();</code> does contain the full <code>David E</code>.  How can I make sure that the text after the space doesn't get slashed out?  </p>