html agility pack - HTMLAgilityPack: C# how to add strings with tags using CreateNode -


i'm trying build html output data might contain html tags (simple ones, link or
).

if add such string html using createnode, unwanted filtering happens. how can fix this?

example:

string mytext = "<strong>intro</strong><br />some explanation"; node.parentnode.replacechild(htmlnode.createnode(mytext, node); 

in resulting html, strong text outputted, rest gone.

why don't try using innerhtml ?

string mytext = "<strong>intro</strong><br />some explanation"; node.parentnode.innerhtml = mytext; 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -