I know how to do it, but I was hoping that it was done before me, and I can reuse that code.
-- Oleg Gunkin Email: [EMAIL PROTECTED] Phone: (604) 666-9392 Emerging Technologies / Pacific Web Services Information Technology Services Public Works and Government Services Canada (Pacific) -----Original Message----- From: Munson, Jacob [mailto:[EMAIL PROTECTED] Sent: Friday, March 03, 2006 12:38 To: CF-Talk Subject: RE: StripHtml function that allows some tags Here's a process I've used in the past: 1. Replace the good tags with a unique identifier. Example, <a*> with ~a*~, and </a> with ~/a~ 2. Remove all bad tags 3. Replace unique identifiers from step one with original tags You will have to learn some regular expression magic to do this (search livedocs for 'regular expressions'), and use CF's ReReplace function a lot (or similar functions). There are some excellent regular expression databases on the web. If you need to I'm sure you can find a RegEx that will find all tags (use it in step 2), and just replace them with nothing. > -----Original Message----- > From: Oleg Gunkin [mailto:[EMAIL PROTECTED] > Sent: Friday, March 03, 2006 1:03 PM > To: CF-Talk > Subject: RE: StripHtml function that allows some tags > > Well, I looked at cflib.org and found stripHTML, which just > strips all html, but I still need to allow some html :( > > > Can anyone help me to find a function tha strips all html > from a string except for the tags I specify. For example, I > want to only allow <a>, <p>, <h*>, and <img> tags, and strip > everything else. [INFO] -- Access Manager: This transmission may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you. A2 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:234124 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

