title: Issue when appending special characters string its replacing with Unicode format
body: <p>When I try to append a string in some input type text value field in php
  using JavaScript then it replaces special character in Unicode format
  like <code>`</code> (a backtick) with &amp;#39.</p>
  
  <p>How to display as special character in input type text value?</p>
  
  <p>I try to convert from this function but after appending its display in Unicode format
  in php htmlentities() function use for display special character in input field
  but I have no idea in java script or jQuery.</p>
  
  <pre><code>&lt;input type ="text" id="LBitemName"&gt;   //php text field
  
   function htmlEntities(str) {
      for (var result = '', index = 0, charCode; !isNaN(charCode = str.charCodeAt(index++));) {
                              result += '\\u' + ('0000' + charCode.toString(16)).slice(-4);
      }
    return result;
  }
  
  
  
  var output = htmlEntities(response[0]['Name']);  //get value from ajax
  
  $('#LBitemName').html(output);  //append in text field
  </code></pre>
  
  <p>Please guide me for this issue</p>