Answers
Mar 06, 2007 - 10:58 PM
I had the same question and rcastagna gave me this answer
------------------
John,
The "easy" (but sometimes tedious) way of doing this is by using the HTML substitue characters for the less-than and greater-than symbols.
Using your example above, you would code it as follows: <font face="arial">
Depending on your needs, you could also use the HttpUtility.HtmlEncode available in .NET...this would come into play a bit more if you were fetching the strings from a database, or some other sort of "dynamic" store.
Let me know if this helps...
Ric Castagna
-----------------------------------
Mar 07, 2007 - 04:28 AM
It's a hassle, but it's the only way if the website doesn't do the html-entities-encoding (the proper term, I believe) automatically.
There is a trick though: You only have to encode the tag opening < character...
- the > can be left as is, since it's not considered a closing tag, when no open tag was found :-)
Mar 07, 2007 - 02:10 PM
Dec 26, 2009 - 12:21 AM
Add New Comment