Welcome to Community Server Sign in | Join | Help

XHTML Entities

I had a similar problem the other day when I unwittingly threw an ampersand in a link's querystring and proceeded to blow up my rss feed. Nice work.

Anyway, I've only tested this on my exceedingly simple html posts and I think it might need a lock on the hashtable in the ctor. In other words, if you want to avoid retyping all the html 4.01 entities over again, you can grab this. Known problem: if you use single-quotes instead of double-quotes on your html attributes (which is legal--but I don't as a rule), it's going to go haywire and replace them on you. Remove it from the character-level encoding (apos) and you'll be fine, just play nice and use ' where necessary on your own.

Published Thursday, April 17, 2003 11:31 PM by grant
Filed Under:

Comments

No Comments
Anonymous comments are disabled