R
rwoodruf
Hello All,
I am using an HtmlTextWriter to writer out some html. Prior to sending the
content to the text writer, HttpUtility.HtmlEncode 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.HtmlEncode("&Attributes");
gives
"&&Attributes"
after being written out by the HtmlTextWriter. The initial encoding results
in "&Attributes". I just want it to be written out as "&Attributes".
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.HtmlEncode 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.HtmlEncode("&Attributes");
gives
"&&Attributes"
after being written out by the HtmlTextWriter. The initial encoding results
in "&Attributes". I just want it to be written out as "&Attributes".
Decoding does something even weirder
Thanks for your help.