|
@@ -1917,7 +1917,10 @@ from django.utils.translation import ugettext as _
|
|
|
|
|
|
|
|
if (location.hash != null && location.hash.length > 1) {
|
|
if (location.hash != null && location.hash.length > 1) {
|
|
|
var targetPath = "";
|
|
var targetPath = "";
|
|
|
- var hash = window.location.hash.substring(1).replace(/(<([^>]+)>)/ig, "");
|
|
|
|
|
|
|
+ var hash = window.location.hash.substring(1);
|
|
|
|
|
+ if (hash.search(/(<([^>]+)>)/ig) > -1) {
|
|
|
|
|
+ hash = encodeURI(hash);
|
|
|
|
|
+ }
|
|
|
if (hash != null && hash != "") {
|
|
if (hash != null && hash != "") {
|
|
|
targetPath = "${url('filebrowser.views.view', path='')}";
|
|
targetPath = "${url('filebrowser.views.view', path='')}";
|
|
|
if (hash.indexOf("!!") != 0) {
|
|
if (hash.indexOf("!!") != 0) {
|
|
@@ -1993,7 +1996,10 @@ from django.utils.translation import ugettext as _
|
|
|
|
|
|
|
|
$(window).bind("hashchange", function () {
|
|
$(window).bind("hashchange", function () {
|
|
|
var targetPath = "";
|
|
var targetPath = "";
|
|
|
- var hash = window.location.hash.substring(1).replace(/(<([^>]+)>)/ig, "");
|
|
|
|
|
|
|
+ var hash = window.location.hash.substring(1);
|
|
|
|
|
+ if (hash.search(/(<([^>]+)>)/ig) > -1) {
|
|
|
|
|
+ hash = encodeURI(hash);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
if (hash != null && hash != "") {
|
|
if (hash != null && hash != "") {
|
|
|
addPathToHistory(hash);
|
|
addPathToHistory(hash);
|