Odd (or maybe not?)--that works for italics so far.

For the bold and underline, it simply removes everything between them.

> -----Original Message-----
> From: Barney Boisvert [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, February 20, 2003 4:23 PM
> To: CF-Talk
> Subject: RE: Allowing specific HTML Tags
> 
> 
> 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
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to