From e23108d1993256507ced03a906c888e1967722d6 Mon Sep 17 00:00:00 2001 From: John McLear Date: Tue, 22 Jan 2013 16:03:00 +0000 Subject: [PATCH] fix issue #1369 where params would break import --- src/static/js/pad_impexp.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/static/js/pad_impexp.js b/src/static/js/pad_impexp.js index c7a26fbe..257dfa66 100644 --- a/src/static/js/pad_impexp.js +++ b/src/static/js/pad_impexp.js @@ -211,9 +211,11 @@ var padimpexp = (function() pad = _pad; //get /p/padname - var pad_root_path = new RegExp(/.*\/p\/[^\/]+/).exec(document.location.pathname) + var pad_root_path = new RegExp(/.*\/p\/[^\/]+/).exec(document.location.pathname); //get http://example.com/p/padname - var pad_root_url = document.location.href.replace(document.location.pathname, pad_root_path) + var pad_root_url = document.location.href.replace(document.location.pathname, pad_root_path); + //strip out params IE ?noColor=true + pad_root_url = pad_root_url.substring(0, pad_root_url.indexOf('?')); //i10l buttom import $('#importsubmitinput').val(html10n.get("pad.impexp.importbutton"));