Here this works perfect.  The final stuff will be in the variable called
TEMP, so just cfoutput it somewhere. you owe me! :)

Profile is the variable of the company profile, of course.  change it to
whatever you wish.  dont change anything else





<CFSET temp=profile>

<CFLOOP index="index" from=1 to=1000>
<CFSET temp2 = Findnocase("<",trim(temp),1)>
<CFSET temp3 = Findnocase(">",trim(temp),1)>
<CFIF temp2 EQ 0>
<CFBREAK>
</CFIF>

<CFSET temp= removechars(temp, temp2, evaluate((temp3-temp2)+1))>
</CFLOOP>









-----Original Message-----
From: Charlie [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 25, 2002 2:59 PM
To: CF-Talk
Subject: Removing html tags stored with text in a database


I have data ( company profile ) stored in a SQL Server data table (ntext).
The interface I built for my client uses a web editor interface allowing the
to control formatting....no problem works great.......

Client would now like to use the first 200 characters of the company profile
on another page within the site, only the do not for the text to be
formatting, they prefer it to match that particular pages style

The data stored in the table has the <html tags> within such as <strong>,
<p>, <em>, and such....is there anyway I can strip out all html tags when
outputting the profile text on the new page




______________________________________________________________________
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

Reply via email to