All...

I'm attempting to combine a few options--and I'm realizing that it's not
working out as well as I'd hoped, but for obvious reasons.

Hopefully, someone will know what I'm attempting to do and guide me to
the light a little bit.

Users make comments to a blog--when they make those comments, they are
entered into the database.  When we view the comments, we have set some
variables so the carriage returns are placed accordingly, by doing:

<CFSET strCRLF = #Chr(10)# & #Chr(13)#>
<CFSET strHTMLCRLF = "<P/>">

When we apply those variables to the comment of the blog:
#Replace(blogContent,strCRLF,strHTMLCRLF,'all')#

Everything works nicely from a display perspective.  In order to be
safe, secure and prevent anyone from entering junk into our
comments--such as unclosed HTML tags or other junk that could "break"
the site, I have set the following:

<CFSET commentOutput =
"#Replace(commentPost,strCRLF,strHTMLCRLF,'all')#">

THEN, because I thought I was wise, I did the following:

#ReReplace(commentOutput,"<[^>]*>"," ","all")# 

This is an attempt to strip out any HTML that anyone ELSE might but in,
failing to realize that I'd just stripped out my own HTML that I wanted
to place in there.  I am taking a guess that I'd have to get rid of the
"all" in my ReReplace, but I'm not entirely sure how that'd work nor am
I sure that's the right path.

Can anyone offer any insight?

Thanks!

Russ Unger
Managing Partner
blueChrome design, LLC
www.bluechromedesign.com
312.593.4260 :office
877.433.8427 :pager
312.873.4033 :fax

Yep, we're hosting CFMX and MySQL.  Email for info.
 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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