From 6c83d739bcbe1cd0edfbf6d4ce4d694d06aea6cf Mon Sep 17 00:00:00 2001 From: KRKeegan <-NOSPAM-kevin@krkeegan.com> Date: Thu, 28 Feb 2008 20:25:51 -0800 Subject: [PATCH] Alter test to a negative, only list not allowed characters --- plugins/admin/templates/settings.tmpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/admin/templates/settings.tmpl b/plugins/admin/templates/settings.tmpl index c4dd52f..e59afa0 100644 --- a/plugins/admin/templates/settings.tmpl +++ b/plugins/admin/templates/settings.tmpl @@ -79,10 +79,10 @@ else{ function showData(form) { var section = "" var setting = "" - re=/^[0-9a-zA-Z\_\+\- \.\\:]*$/; + re=/[\[\]<>|]/; inputs = form.getElementsByTagName("input"); for (i = 0; i < inputs.length; i++){ - if (inputs[i].type == 'text' && !re.exec(inputs[i].value)){ + if (inputs[i].type == 'text' && re.exec(inputs[i].value)){ setting = inputs[i].name; break; } @@ -95,7 +95,7 @@ function showData(form) { key = map[i].split('|'); //buffer += key[0] + "---" + key[1] + "===" + splitSetting[0] + "\n"; if (splitSetting[0] == 'Server'){ - section = 'Server'; + section = 'server'; break; } if (key[0] == splitSetting[0]){ -- 2.11.4.GIT