ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 5th, 2005, 08:53 AM
Mudflap4874 Mudflap4874 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 116 Mudflap4874 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 14 h 11 m 59 sec
Reputation Power: 5
Please help me Strip ...

... out HTML. The search feature for the site returns HTML code in the first 100 characters of the Summary. Then the results get all messed up because sometimes image HTML is returned, such as <img src="images/blah ....., it's looking for the image but since the tag isn't completed, a broken image displays. What I'd like to do is just output the results Summary as plain text, or just ignore any HTML tags.

Current code is as follows for Summary:
Code:
<cf_replacemappingvars body = "#output#">
<cfif custom1 IS NOT '#www_ip_mapping#/glossary/showContent.cfm?subtopicid='>
<font size="-1" face="arial">#mid(output,1,100)#...</font>
</cfif>


Found this, but not exactly sure how to implement:
Code:
<cfset that=REReplaceNoCase(this,"<[a-z/][^>]*>","","All")>


Where does the #output# need to be placed and are there other VARs that need to be set up?

Is there something else that can be done?

Does any of this make sense?

TIA ...

Reply With Quote
  #2  
Old January 6th, 2005, 10:59 AM
VelvettFogg VelvettFogg is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 34 VelvettFogg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 13 m 46 sec
Reputation Power: 4
<cf_replacemappingvars body = "#output#">

<cfset that=REReplaceNoCase(this,"<[a-z/][^>]*>","","All")>

Im not sure exactly what that custom tag is doing.. since you did not tell us... but.. to take a guess as to what you need...

<cf_replacemappingvars body = REReplaceNoCase(output,"<[a-z/][^>]*>","","All")>

that should make the var body hold only text, no html.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > Please help me Strip ...


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT