You can try Server.HTMLEncode( string )
http://msdn2.microsoft.com/en-us/library/ms525347.aspx
I don't see how it would blow up on the " " because there is nothing invalid about this, specifically in regards to Xhtml.
Other than that you are probably going to have to write your own function to replace characters properly.
I discovered that XML does not recognize . Instead, you have to add a document type to the top of your XML:
<!DOCTYPE stylesheet [<!ENTITY nbsp " ">
This fixes the problem.
0 comments:
Post a Comment