Hello All,
I am using an HtmlTextWriter to writer out some html. Prior to sending the
content to the text writer, HttpUtility.Htm lEncode the string. However, doing
so results in a string where "&" become "&" and "<" becomes "<".
This is a problem because I am trying to actually write out html. Does
anyone know how I can solve this problem.
For example
HttpUtility.Htm lEncode("&Attri butes");
gives
"&&Attribut es"
after being written out by the HtmlTextWriter. The initial encoding results
in "&Attribute s". I just want it to be written out as "&Attribute s".
Decoding does something even weirder :)
Thanks for your help.
I am using an HtmlTextWriter to writer out some html. Prior to sending the
content to the text writer, HttpUtility.Htm lEncode the string. However, doing
so results in a string where "&" become "&" and "<" becomes "<".
This is a problem because I am trying to actually write out html. Does
anyone know how I can solve this problem.
For example
HttpUtility.Htm lEncode("&Attri butes");
gives
"&&Attribut es"
after being written out by the HtmlTextWriter. The initial encoding results
in "&Attribute s". I just want it to be written out as "&Attribute s".
Decoding does something even weirder :)
Thanks for your help.
Comment