If the data is being pasted from word, you will probably need to clean (Replace) the special Microsoft characters that word generates for most of its invisible characters. I know I had problems posting data being pasted from word to my db, and it was those special characters causing the problem. Check the adobe site, they had an article on there somewhere with the hex character for most of the problem text. And you may also need to replace quotes with something else, or remove them altogether.
-----Original Message----- From: Les Mizzell [mailto:[EMAIL PROTECTED] Sent: Thursday, May 03, 2007 8:30 PM To: CF-Talk Subject: Cleaning stored text to get valid XML I've had an application set up for awhile now that allows a user to post and email newsletters from their site. The body text is entered on a form using fckeditor, and since these folks are lawyers, almost everything is pasted from Word and fckeditor is handling whatever is thrown at it. Now, they wish to create a RSS feed from all their newsletters. Oh boy. There's all kinds of crap in the data - curly quotes, apostrophies, HTML tags, and gawd knows what else. I've been going nutz trying to clean the existing text enough to create valid XML text so it will display. I start by getting rid of all the HTML junk, which is working fine: <cfset request.bodynohtml = "#rereplacenocase(stories.body,"<[^>]*>","","all")#" > After that, it gets a little weird. I've tried all sorts of functions, xmlFormat2.cfm, ConvertSpecialChars ... chaining rereplacenocase to get rid of left and right quotes, apostrophies, whatever other junk I keep finding ... Nothing seems to be getting rid of everything, and the feed still isn't displaying correctly. I know my code base is OK because I've created two other feeds that are working. There's *something* in the text that's still stopping a correct display. How are you folks handling this sort of thing? This one is working: http://www.nelsonmullins.com/rss/rss_press.cfm This one ain't - there's something in the body text somewhere I'm not stripping out... http://www.nelsonmullins.com/rss/rss_newsletters.cfm Suggestions? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Upgrade to Adobe ColdFusion MX7 The most significant release in over 10 years. Upgrade & see new features. http://www.adobe.com/products/coldfusion?sdid=RVJR Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:277045 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

