Merge pull request #4933 from owncloud/1376-filesappplussigninurlbug

Replace plus sign with space in files app URL #4932
This commit is contained in:
Vincent Petry 2013-10-04 05:30:30 -07:00
commit ba0f2f10a7
1 changed files with 6 additions and 2 deletions

View File

@ -895,6 +895,10 @@ $(document).ready(function(){
$(window).trigger('beforeunload');
});
function decodeQuery(query){
return query.replace(/\+/g, ' ');
}
function parseHashQuery(){
var hash = window.location.hash,
pos = hash.indexOf('?'),
@ -911,11 +915,11 @@ $(document).ready(function(){
dir = '/';
// try and parse from URL hash first
if (query){
params = OC.parseQueryString(query);
params = OC.parseQueryString(decodeQuery(query));
}
// else read from query attributes
if (!params){
params = OC.parseQueryString(location.search);
params = OC.parseQueryString(decodeQuery(location.search));
}
return (params && params.dir) || '/';
}