The way to fix this is to fix the problem that is causing the bad data to exist in the first place, not cover it up with a workaround.
However, the workaround is fairly straightforward. <cfset url = "http://www.test.com</a></p>"> <cflocation url="#left(url, find("<",str,1) - 1)#"> jon W Luke wrote: >Hi. > >I have a bit of a problem with URLs and Cflocation. Occasionally, a URL is >submitted into the Database which contains extra HTML tags that aren't >needed as shown below: > >http://www.mywebpage.com</a></p> > >Cflocation doesn't (yet!) have the power to strip out non-URL content such >as </a> and </p>, AFAIK, and as such it errors. What I need to do is assign >the link to a var prior to unleashing cflocation onto it, and validate it >and remove any erroneous tags if there are any to make it a nice clean link. > >Is this is long refindnocase job, or is there a tag or function that could >help? > >Many thanks once again. > >Will > > >-- >http://www.localbounty.com - free local and national advertising > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 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 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

