Something like:

<cfset FORM.body = 
REreplaceNoCase(FORM.body,"<a([^>]+)>","<a \1
target=""_blank"">","ALL")>

______________________
steve oliver
cresco technologies, inc.
http://www.crescotech.com


-----Original Message-----
From: Dave Hannum [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 24, 2002 7:24 AM
To: CF-Talk
Subject: Forcing Target Attribute Into Link


Hello,

I have a little "content management" application where the users can
insert
hyperlinks via manually coding the href's into the article they are
entering.  However, to keep visitors from leaving the site when they
click
on these links, I wish to force the TARGET="_blank" attribute into those
links, because the users refuse to.  I need to check for the existence
of
this attribute in a link (that goes into the database) and force it in
if it
does not exist.  Anybody done this before and care to share?  I figure
it's
a job for RegEx but . . . .

Thanks,
Dave

=================================
"If your wife is having fun and you're not,
you're still having a lot more fun than if you're
having fun and she's not!'  - Red Green


______________________________________________________________________
Get Your Own Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to