From 275592e423d8adcd6349bbd6bbe5d1940427c65f Mon Sep 17 00:00:00 2001 From: John McLear Date: Wed, 11 Feb 2015 02:07:20 +0000 Subject: [PATCH] seems right --- src/static/js/pad_impexp.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/static/js/pad_impexp.js b/src/static/js/pad_impexp.js index 77f1eb28..96761570 100644 --- a/src/static/js/pad_impexp.js +++ b/src/static/js/pad_impexp.js @@ -188,7 +188,8 @@ var padimpexp = (function() pad = _pad; //get /p/padname - var pad_root_path = new RegExp(/.*\/p\/[^\/]+/).exec(document.location.pathname); + // if /p/ isn't available due to a rewrite we use the clientVars padId + var pad_root_path = new RegExp(/.*\/p\/[^\/]+/).exec(document.location.pathname) || clientVars.padId; //get http://example.com/p/padname without Params var pad_root_url = document.location.protocol + '//' + document.location.host + document.location.pathname;