title: Javascript - sanitize specific html element
body: <p>First of all, i have a return from API in a form of html. This will be used in my jqgrid. The sample return would be like this
  Example name for my object is <code>obj</code>. Then <code>obj.something</code> is below.</p>
  
  <pre><code>&lt;div title="custom_title"&gt;
      &lt;div id="upper"&gt;
           data from somewhere and this is the part that sometimes need to be sanitized without affecting the other tags
      &lt;/div&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p>What i tried so far was trying to do this:
      var esc = $('');
      then did do this: <code>esc.text(obj.something).html();</code> but it sanitize all of it. 
  Is there anything that i may not know on how to sanitize purely on javascript?</p>
  
  <p>Any help is greatly appreciated.</p>