Replace particular html tags using javascript
<p>I want to replace every <code>&lt;li&gt;</code> tag with <code>#</code> &amp; every <code>&lt;/li&gt;</code> with <code>&lt;br /&gt;</code></p>

<p>I think i need a Global repalce function for that rather than simple <code>string.replace()</code> so..</p>

<pre><code>var s=obj1.innerHTML;

 s = s.replace(/&lt;li&gt;/g,&amp;quot;# &amp;quot;);
 s = s.replace(/&lt;/li&gt;/g,&amp;quot;&lt;br/&gt;&amp;quot;);
</code></pre>

<p>But it doesn't seem to be working. Any mistake ?</p>

<p><strong>EDIT:</strong> I am going to use the code in blogger &amp; that is why it needs to be parsed.So that's why you see <code>&amp;quot;</code> instead of <code>"</code>.</p>
