Since the volume will be "more than a few", I'd make sure you do any data manipulation
ON THE WAY IN.
It will cost too much to do it on the fly while displaying. For now, we will get it
working this way.
But to recap.
1. pull data from db
you obviously know how to do this
2. remove any tags not in the following list: <b></b><i></i><a href="etc"></a><img
src="etc">
here, use the function from Isaac: <cfset thedata =
striptags("allow","a,b,i,img",thedata)>
3. display the resulting data as HTML
<cfoutput>#theData#</cfoutput>
That should be all there is to it.
Jerry Johnson
>>> [EMAIL PROTECTED] 02/24/03 04:20PM >>>
I'm having difficulty ONLY allowing the following characters:
<b></b><i></i><a href="etc"></a><img src="etc">
Right now, I have nothing allowed, but I'd like to allow linking and
images, at the very least and the others are a bonus. So, I don't want
to allow things like <td> that isn't closed--because it can break the
display. No one wants that, you know?
As far as volume, the site seems to be growing pretty quickly, so I'd
say that it'll be a medium volume site.
Russ
> -----Original Message-----
> From: Jerry Johnson [mailto:[EMAIL PROTECTED]
> Sent: Monday, February 24, 2003 3:08 PM
> To: CF-Talk
> Subject: RE: Allowing specific HTML tags to be displayed
>
>
> Is it a fairly low volume site?
>
> I have often written the code out to a temp file, and then
> used cfinclude to pull it in. This is mainly used for cf code
> stored in a db that I want to have executed.
>
> But I still don't quite get what you are trying to do.
>
> It sounds like you have HTML code in a db field.
>
> You want to output that HTML to the screen, and have it work
> like HTML.
>
> As far as I know (meaning I do it all the time in cf5), you
> just need to <cfoutput> the HTML code to the screen, and it
> will render.
>
> <cfoutput>#HTMLCode#</cfoutput>
>
> What part are you getting stuck on?
>
> Jerry Johnson
>
> >>> [EMAIL PROTECTED] 02/24/03 03:54PM >>>
> I'm looking in to this and realize that I've mis-described what I'm
> trying to do.
>
> I don't want the tags to be displayed, instead, I want them to be
> actually WORK.
>
> So, if someone does <a href="http://www.blinktag.org>blinktag.org</a>
> then it shows up in the output the link blinktag.org that will work.
> >From the look of the examples in that tag, it doesn't seem
> that it'll do
> that, but I'll continue plugging at it.
>
> Thanks for the suggestion.
>
> Russ
>
> > -----Original Message-----
> > From: Jerry Johnson [mailto:[EMAIL PROTECTED]
> > Sent: Monday, February 24, 2003 1:24 PM
> > To: CF-Talk
> > Subject: Re: Allowing specific HTML tags to be displayed
> >
> >
> > http://www.cflib.org/udf.cfm?ID=774
> >
> > This should get you there.
> >
> > Jerry Johnson
> >
> > >>> [EMAIL PROTECTED] 02/24/03 02:16PM >>>
> > All--
> >
> > I've still not had any luck trying to get Replace or
> > ReReplace to allow
> > a set of specific codes when displaying information from a database.
> >
> > I'm hoping to allow for only specific sets: Italics, Bold,
> A HREF and
> > IMG SRC and I'm baffled as to how to get this to work. It's
> > a bit of a
> > repost, but I'm really striking out.
> >
> > 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
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community. http://www.fusionauthority.com/ads.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4