C
Csaba Gabor
I'm not talking javascript hara-kiri here. I've got
a database of web pages or snippets I've created
and I'd like to display them in a table. So on my
server (in PHP) I take all the files, and plunk the
text for each between <TD> tags and return that
page, everyone's happy.
Now some joker (me) comes along and puts the single line
<SCRIPT>alert('Hi mom')</SCRIPT>Dad
as the the entry for one file. Sure enough, when
the client gets the page s/he also gets an alert.
So what I'd like to do is to turn off any "immediate
scripting" that happens due to <SCRIPT> tags
within the <TABLE> element (or even the whole
document).
But wait, it gets worse. Plunk the following in between
TD tags (on my IE 6 or Opera 7.23 anyway) and I still
get the alert:
<html><head><title>hi mom alert test</title></head>
<body onLoad='alert("Hi Mom")'>Dad</body></html>
So I'm looking for something that will Just say, "No"
to Javascript "happening" between certain TD tags.
You know in IE when you click on a .HTM or .HTML
file you get a minimalist preview of it on the left? That's
what I want these containing TDs to be.
Thanks, Csaba Gabor
PS. There's a (post TD) part two to this if we get past
this part one.
a database of web pages or snippets I've created
and I'd like to display them in a table. So on my
server (in PHP) I take all the files, and plunk the
text for each between <TD> tags and return that
page, everyone's happy.
Now some joker (me) comes along and puts the single line
<SCRIPT>alert('Hi mom')</SCRIPT>Dad
as the the entry for one file. Sure enough, when
the client gets the page s/he also gets an alert.
So what I'd like to do is to turn off any "immediate
scripting" that happens due to <SCRIPT> tags
within the <TABLE> element (or even the whole
document).
But wait, it gets worse. Plunk the following in between
TD tags (on my IE 6 or Opera 7.23 anyway) and I still
get the alert:
<html><head><title>hi mom alert test</title></head>
<body onLoad='alert("Hi Mom")'>Dad</body></html>
So I'm looking for something that will Just say, "No"
to Javascript "happening" between certain TD tags.
You know in IE when you click on a .HTM or .HTML
file you get a minimalist preview of it on the left? That's
what I want these containing TDs to be.
Thanks, Csaba Gabor
PS. There's a (post TD) part two to this if we get past
this part one.