apswater
VP-CART Super User
444 Posts |
Posted - June 18 2007 : 18:48:56
|
I am not sure how useful this is, but it was for me.
I use a lot of html links in my category and product descriptions, and I also use those descrptions to create my dynamic meta tags. I dont think it is very good to have html in your meta tages, so I wrote this little routine to strip html out of a variable.
maybe some of you can find it usefull.
it is asp ...
'__________ html strip start
Dim thetext, howmanyletters, whatnumberletter, collectletterswitch, theletter, theendtext, whatletter
thetext= (Your variable here)
collectletterswitch="off"
howmanyletters=len(thetext)
collectletterswitch="on"
for whatletter=1 to howmanyletters
theletter = Mid(thetext, whatletter, 1)
if theletter = "<" then collectletterswitch = "off"
if collectletterswitch = "on" then theendtext=theendtext & theletter end if
if theletter = ">" then collectletterswitch = "on"
next
(Your variable here)=theendtext
'_______ html strip end |
Edited by - apswater on June 18 2007 18:56:00 |
|