Fixed NULL pointer at end of scipt_tags[] array

SVN revision: 2199
This commit is contained in:
2009-05-25 15:24:33 +00:00
parent 4ef3a2fad1
commit 76771b375e
+2 -2
View File
@@ -5411,7 +5411,7 @@ int is_html(char *s)
char *script_tags[] = { "onerror", "onabort", "onchange", "onclick", "ondblclick", "onfocus", "onkeydown",
"onkeyup", "onload", "onmousedonw", "onmousemove", "onmouseover", "onmouseup",
"onreset", "onselect", "onsubmit", "onunload", "javascript"
"onreset", "onselect", "onsubmit", "onunload", "javascript", NULL
};
int is_script(char *s)
@@ -5425,7 +5425,7 @@ int is_script(char *s)
str[i] = tolower(s[i]);
str[i] = 0;
for (i = 0; script_tags[i][0]; i++) {
for (i = 0; script_tags[i] != NULL; i++) {
if (strstr(str, script_tags[i])) {
xfree(str);
return TRUE;