Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 Customization
 html stripper
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

apswater
VP-CART Super User

444 Posts

Posted - June 18 2007 :  18:48:56  Show Profile  Visit apswater's Homepage  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000
0 Item(s)
$0.00