Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Fix usage of document href with # in it.
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Oct 27, 2014
1 parent a87d144 commit a715497
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions core/src/plugins/editor.browser/class.BrowserOpener.js
Expand Up @@ -30,8 +30,7 @@ Class.create("BrowserOpener", AbstractEditor, {
return;
}
var repo = ajaxplorer.user.getActiveRepository();
var loc = document.location.href;
if(loc.indexOf("?") !== -1) loc = loc.substring(0, loc.indexOf("?"));
var loc = document.location.href.split('?').shift().split('#').shift();
var url = loc.substring(0, loc.lastIndexOf('/'));
if($$('base').length){
url = $$("base")[0].getAttribute("href");
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/editor.video/class.VideoPreviewer.js
Expand Up @@ -98,7 +98,7 @@ preload="auto" width="#{WIDTH}" height="#{HEIGHT}" data-setup="{}">\n\

getPreview : function(ajxpNode, rich){
if(rich){
var url = document.location.href;
var url = document.location.href.split('#').shift().split('?').shift();
if(url[(url.length-1)] == '/'){
url = url.substr(0, url.length-1);
}else if(url.lastIndexOf('/') > -1){
Expand Down

0 comments on commit a715497

Please sign in to comment.