REreplace(commentPost, "</?(([^biua])|([^i][^m][^g]))[^>]*>", "", "all")
I think that'll work, but I"m not exactly sure. Basically you're replacing any tag except for single-character tags 'b', 'i', 'u' and 'a', as well as the multicharacter tag 'img' with nothing. An easier solution as you add more allowable tags would probably be to just do a loop over the content, looking at each instance of '<' and seeing if you need to remove it. barneyb > -----Original Message----- > From: Russ [mailto:[EMAIL PROTECTED]] > Sent: Thursday, February 20, 2003 1:44 PM > To: CF-Talk > Subject: Allowing specific HTML Tags > > > All, > > I've used the following before: > > <CFSET commentOutput = "#ReReplace(commentPost,"<[^>]*>"," ","ALL")#"> > > To disallow any type of HTML tags from screwing up a display, but now > I'm crossing into something new. > > Now, I want to allow <b></b><i></i><u></u><a href><img src> tags, and to > be honest, I don't quite follow the ReReplace from up above, but I don't > want to eliminate anyone from posting table tags, etc. that could break > something that is displayed. > > Any thoughts? > > Thanks, > > Russ > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

