Only inline svg within WebserverRoot and containing bi-

-- we use bi- to mark images that should behave like bootstrap font images
This commit is contained in:
milan 2024-11-11 16:32:54 +01:00
parent 1d5457b477
commit 034b0b4645

View File

@ -185,8 +185,8 @@ export class Et2Image extends Et2Widget(LitElement) implements et2_IDetachedDOM
// our own svg images
//only call unsafeHtml when we are inside /egroupware/
const ourSvg = url.match(/\/egroupware\/([^.]+)\.svg/);
if (ourSvg)
const ourSvg = url.startsWith(this.egw().webserverUrl + '/') //checks if source is trusted
if (ourSvg && url.match(/\/bi-.*\.svg/))
{
const svg = fetch(url)
.then(res => res.text()