[thelist] RE: ColdFusion and checking HTML

jon steele jjsteele22 at yahoo.com
Thu Apr 26 10:23:21 CDT 2001


Thanks Josh,

Is there a way to strip all html tags from a string (remove everything
between '<' and '>'? That is, only leave the text? Maybe I can alter
that to strip &nbsp; and leave <img> tags, then Trim it and check that
string's length. How could I get rid of the HTML tags?

Thanks,
Jon.


Joshua's Message:

Hmmm... interesting problem.  Unfortunately, the algorithm you 
mentioned
will not be enough to solve the problem, though it will get close.  If 
you
are happy with close, then yes, the loop can be constructed.  It'll be 
slow
as h**l in ColdFusion, but it can be done.

Try converting the string to an array using > is the delimiter.  Then 
loop
through the array checking the items against your checklist.

-joshua


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/




More information about the thelist mailing list