[thelist] ColdFusion and checking HTML
jon steele
jjsteele22 at yahoo.com
Wed Apr 25 19:31:08 CDT 2001
Hi,
I'm in quote a dilemma. (not a good way to start off is it :-) )
Hopefully some skilled CFer can help.
I need to check an array full of strings for non-html text. That is, I
want to check to see if the text in the array would show something when
viewed in a browser or not. For example this should pass the
validation:
myarray[1]="<p class=blah style=blah>text</p><span id=blah
style=blah> </span><img src=blah>"
But this should NOT be allowed:
myarray[2]="<p class=blah style=blah> </p><span></span>"
Since when viewed in a browser, the above code would show a blank page.
Is there an easy function which checks this?
If not can someone help me in developing a loop which will check every
instance of ">", then verify that the next character is not "<", the
next 6 characters are not " ", but allow it if the next 4
characters are "<img".
Thank you. I tried this but could not get it. I was able to do it in
JavaScript, so there's gotta be a way in ColdFusion.
Jon.
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/
More information about the thelist
mailing list