From c224de1994beaeb3d48698f6f0f1671d9e4768af Mon Sep 17 00:00:00 2001 From: Lars Jung Date: Sun, 1 Jun 2014 20:37:29 +0200 Subject: [PATCH] More URL fixes. --- src/_h5ai/client/js/inc/core/location.js | 19 +++++++++++++++---- src/_h5ai/conf/options.json | 4 ++-- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/_h5ai/client/js/inc/core/location.js b/src/_h5ai/client/js/inc/core/location.js index 87cfdde2..8ad67059 100644 --- a/src/_h5ai/client/js/inc/core/location.js +++ b/src/_h5ai/client/js/inc/core/location.js @@ -14,14 +14,25 @@ modulejs.define('core/location', ['_', 'modernizr', 'core/settings', 'core/event return href .replace(/\/+/g, '/') - .replace(/ /g, '%20') + + .replace(/!/g, '%21') + .replace(/#/g, '%23') + .replace(/\$/g, '%24') + .replace(/&/g, '%26') .replace(/'/g, '%27') - .replace(/\[/g, '%5B') - .replace(/\]/g, '%5D') .replace(/\(/g, '%28') .replace(/\)/g, '%29') + .replace(/\*/g, '%2A') .replace(/\+/g, '%2B') - .replace(/\=/g, '%3D'); + .replace(/\,/g, '%2C') + // .replace(/\//g, '%2F') + .replace(/:/g, '%3A') + .replace(/;/g, '%3B') + .replace(/=/g, '%3D') + .replace(/\?/g, '%3F') + .replace(/@/g, '%40') + .replace(/\[/g, '%5B') + .replace(/\]/g, '%5D'); }, reUriToPathname = /^.*:\/\/[^\/]*|[^\/]*$/g, diff --git a/src/_h5ai/conf/options.json b/src/_h5ai/conf/options.json index 22e13cf0..0455851c 100644 --- a/src/_h5ai/conf/options.json +++ b/src/_h5ai/conf/options.json @@ -24,7 +24,7 @@ Options General view options. - binaryPrefix: set to true uses 1024B=1KiB when formatting file sizes (see http://en.wikipedia.org/wiki/Binary_prefix) - - extInNewWindow: open non-h5ai links in new window/tab + - extInNewWindow: open non-{{pkg.name}} links in new window/tab - hidden: don't list items matching these regular expressions - hideFolders: hide all folders in the main view - hideIf403: hide files and folders that are not readable by the server @@ -42,7 +42,7 @@ Options The user selected view mode is also stored local in modern browsers so that it will be persistent. - smartBrowsing: use History API if available (no need to reload the whole page) - - theme: name of one of the folders in "_h5ai/client/themes", defaults to "fallback" + - theme: name of one of the folders in "_{{pkg.name}}/client/themes", defaults to "fallback" */ "view": { "binaryPrefix": false,