Thanks. That was perfect. -----Original Message----- From: Ben Doom [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 08, 2004 2:20 PM To: CF-Talk Subject: Re: how to truncate html properly?
rereplace(string, '<[^>]*$', '') This should replace an unclosed tag at the end of the string. It will not fix mismatched tags: <b>this is broken</b becomes <b>this is broken Not tested, off the top of my head, YMMV, keep your arms inside the ride, etc. --Ben Emmet McGovern wrote: > I need to truncate an output that has html in it to 200 lines. The problem > arises when it truncates at 200 in the middle of a image > > Ex ( Hello world. <img src="img.gif" border="0"> look at this <img src="im ) > > I can't figure out how to strip out an unfinished image tag so I can get rid > of the broken image that displays. > > Any solutions? > > Thanks, > Emmet > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Special thanks to the CF Community Suite Silver Sponsor - RUWebby http://www.ruwebby.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:186700 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=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

