title: Insert HTML into text node with JavaScript
body: <p>I've got a little text node:</p>
  
  <pre><code>var node
  </code></pre>
  
  <p>And I want to wrap a span around every occurrence of "lol".</p>
  
  <pre><code>node.nodeValue = node.nodeValue.replace(/lol/, "&lt;span&gt;lol&lt;/span&gt;")
  </code></pre>
  
  <p>It it prints out <code>"&lt;span&gt;lol&lt;span&gt;"</code> when I want <code>"lol"</code> as a span element.</p>