mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 23:00:56 +01:00
Et2Image: Check that src from content is valid to avoid overwriting existing src attribute
Happens in Kanban contact, src="email" but email has a value (an email address)
This commit is contained in:
parent
d5d6d54902
commit
95f10b57f3
@ -197,7 +197,8 @@ export class Et2Image extends Et2Widget(SlotMixin(LitElement)) implements et2_ID
|
||||
{
|
||||
super.transformAttributes(_attrs);
|
||||
|
||||
// Expand src with additional stuff. Copy & paste from legacy.
|
||||
// Expand src with additional stuff
|
||||
// This should go away, since we're not checking for $ or @
|
||||
if(typeof _attrs["src"] != "undefined")
|
||||
{
|
||||
let manager = this.getArrayMgr("content");
|
||||
@ -208,9 +209,16 @@ export class Et2Image extends Et2Widget(SlotMixin(LitElement)) implements et2_ID
|
||||
{
|
||||
if(typeof src == "object")
|
||||
{
|
||||
src = egw().link('/index.php', src);
|
||||
this.src = this.egw().link('/index.php', src);
|
||||
}
|
||||
else if(this.src && this.egw().image(src))
|
||||
{
|
||||
this.src = src;
|
||||
}
|
||||
else if(!this.src)
|
||||
{
|
||||
this.src = src;
|
||||
}
|
||||
this.src = src;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user