diff options
author | Marc Delisle <marc@infomarc.info> | 2014-09-13 18:39:21 +0400 |
---|---|---|
committer | Marc Delisle <marc@infomarc.info> | 2014-09-13 18:39:21 +0400 |
commit | c85c9fd4176eafc9a3586d9fddad6343365a2738 (patch) | |
tree | 7b0fb3cfd412789658ed2d7f330f48edbb0dad4f /js/ajax.js | |
parent | 757bd719594e782ca869dedcaaad82589a8ab831 (diff) | |
parent | 33b39f9f1dd9a4d27856530e5ac004e23b30e8ac (diff) |
Fix merge conflicts
Signed-off-by: Marc Delisle <marc@infomarc.info>
Diffstat (limited to 'js/ajax.js')
-rw-r--r-- | js/ajax.js | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/js/ajax.js b/js/ajax.js index d8df310a46..d8b0a3ba7d 100644 --- a/js/ajax.js +++ b/js/ajax.js @@ -920,9 +920,16 @@ AJAX.setUrlHash = (function (jQuery, window) { if (window.location.hash.substring(0, 8) == '#PMAURL-') { // We have a valid hash, let's redirect the user // to the page that it's pointing to - window.location = window.location.hash.substring( - window.location.hash.indexOf(':') + 1 - ); + var colon_position = window.location.hash.indexOf(':'); + var questionmark_position = window.location.hash.indexOf('?'); + if (colon_position != -1 && questionmark_position != -1 && colon_position < questionmark_position) { + var hash_url = window.location.hash.substring(colon_position + 1, questionmark_position); + if (PMA_gotoWhitelist.indexOf(hash_url) != -1) { + window.location = window.location.hash.substring( + colon_position + 1 + ); + } + } } else { // We don't have a valid hash, so we'll set it up // when the page finishes loading |