From d643e7fd8a5a18bce8eeb6fc42050c8ab3ca7217 Mon Sep 17 00:00:00 2001 From: Ian Prest Date: Sun, 29 Sep 2013 20:47:04 -0400 Subject: [PATCH] Fix a defect in the URLON encoding with empty strings. --- js/urlon.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/urlon.js b/js/urlon.js index b94002a..cb97b1b 100644 --- a/js/urlon.js +++ b/js/urlon.js @@ -26,7 +26,7 @@ URLON = { return '_' + res.join('&') + ';'; } // String or undefined - return '=' + encodeString((input || "null").toString()); + return '=' + encodeString((input !== null ? input : "null").toString()); } return stringify(input).replace(/;+$/g, '');