Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Converting HTML to XML ?

0 views
Skip to first unread message

Helena

unread,
Aug 10, 2002, 3:01:19 PM8/10/02
to
I wish to hold user-uploaded HTML content in my ASP.NET website database.
For security and style reasons I want to allow them only a limited subset of
html tags (such as <b> <i> <p> <br> <a> <img>) with all tags/attributes to
be removed/ignored. Does anyone have any ideas how I might do this? I woyld
be very grateful for any suggestions.


Craig Deelsnyder

unread,
Aug 10, 2002, 6:56:26 PM8/10/02
to
First thing I thought of was to use XML (require end-tags, etc. like XHTML).
Create your own DTD that defines only these elements. Take the user's
inputted HTML/XHTML, load into XML parser, and validate with your DTD.


"Helena" <HSto...@hotmail.com> wrote in message
news:OnjnsAKQCHA.1672@tkmsftngp12...

0 new messages