summaryrefslogtreecommitdiff
path: root/prefs.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2006-05-19 04:10:58 +0100
committerAndrew Dolgov <[email protected]>2006-05-19 04:10:58 +0100
commit605f7d463dc68eccc02c77f989302d7b9035b456 (patch)
treefab10dabb99f901cd9a1444195220e6ca731a1f1 /prefs.js
parentcaa53a7cb1fb1a52daf561209ea4aaceb4578bfc (diff)
fix url checking, param sanitizing in feed & cat editors, fix browser_has_opacity()
Diffstat (limited to 'prefs.js')
-rw-r--r--prefs.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/prefs.js b/prefs.js
index ccc0d7859..1994495a9 100644
--- a/prefs.js
+++ b/prefs.js
@@ -282,8 +282,7 @@ function addFeed() {
if (link.value.length == 0) {
alert("Error: No feed URL given.");
- } else if (link.value.match("http://") == null &&
- link.value.match("https://") == null) {
+ } else if (!isValidURL(link.value)) {
alert("Error: Invalid feed URL.");
} else {
notify("Adding feed...");
@@ -746,6 +745,11 @@ function feedEditSave() {
notify("Feed title cannot be blank.");
return;
}
+
+ if (!isValidURL(link)) {
+ alert("Feed URL is invalid.");
+ return;
+ }
var auth_login = document.getElementById("iedit_login").value;
var auth_pass = document.getElementById("iedit_pass").value;