Html encoding only text nodes

Topics: Developer Forum
Apr 23, 2012 at 5:40 PM

Hi,

Struggled with this for a while.

Can html agility pack currently encode only text nodes ?

I.E : "

hi <3 Did you know we're stocklists blah blah, can read our blog here 
<a href='http://google.com'>http://google.com</a> blah
<3 hi

"

would become

"

hi &lt;3 Did you know we&#39;re stocklists blah blah, can read our blog here 
<a href='http://google.com'>http://google.com</a> blah
&gt;3 hi

"

I searched over the web and found no answer. The thing is because of the processing I'm doing to the html text I don't really want for the html tags like link tag or any other to be encoded too

 

Thanks a ton,

Doru