From df7b8857a2c6126ed4a494f110c9a85963c17a7a Mon Sep 17 00:00:00 2001 From: Tim Hammerquist Date: Wed, 18 Jun 2008 19:03:25 +0000 Subject: [PATCH] allow setting firefox prefs to IP addresses. --- content/options.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/content/options.js b/content/options.js index a047b40b..74109719 100644 --- a/content/options.js +++ b/content/options.js @@ -360,9 +360,8 @@ liberator.Options = function () //{{{ value = false; break; default: - var valueInt = parseInt(value, 10); - if (!isNaN(valueInt)) - value = valueInt; + if (/^(\d+)$/.test(value)) + value = parseInt(value, 10); } liberator.options.setPref(name, value); }