mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-27 18:33:39 +01:00
fix wired CSP error after some 404 in html content
This commit is contained in:
parent
056e5c053a
commit
71baa8654c
@ -44,7 +44,10 @@ function et2_loadXMLFromURL(_url, _callback, _context, _fail_callback)
|
|||||||
win = top;
|
win = top;
|
||||||
}
|
}
|
||||||
win.jQuery.ajax({
|
win.jQuery.ajax({
|
||||||
url: _url,
|
// we add the full url (protocol and domain) as sometimes just the path
|
||||||
|
// gives a CSP error interpreting it as file:///path
|
||||||
|
// (if there are a enough 404 errors in html content ...)
|
||||||
|
url: (_url[0]=='/' ? location.protocol+'//'+location.host : '')+_url,
|
||||||
context: _context,
|
context: _context,
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
dataType: 'xml',
|
dataType: 'xml',
|
||||||
@ -55,7 +58,7 @@ function et2_loadXMLFromURL(_url, _callback, _context, _fail_callback)
|
|||||||
egw().debug('error', 'Loading eTemplate from '+_url+' failed! '+_xmlhttp.status+' '+_xmlhttp.statusText);
|
egw().debug('error', 'Loading eTemplate from '+_url+' failed! '+_xmlhttp.status+' '+_xmlhttp.statusText);
|
||||||
if(typeof _fail_callback !== 'undefined')
|
if(typeof _fail_callback !== 'undefined')
|
||||||
{
|
{
|
||||||
_fail_callback.call(_context, _err)
|
_fail_callback.call(_context, _err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user