mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
fix(realtime): fix realtime conflicts by cleaning attributes earlier
This commit is contained in:
parent
87373eaff2
commit
10d8e4332c
@ -575,6 +575,10 @@ var factory = function (Util) {
|
||||
Object.keys(origin.attributes).forEach(function (i) {
|
||||
if (!/^data-attr/.test(origin.attributes[i].name)) { return; }
|
||||
var name = origin.attributes[i].name.slice(10);
|
||||
// Ignore attributes filtered out by the sanitizer
|
||||
if (name === "src") { return; }
|
||||
if (name === "srcdoc") { return; }
|
||||
if (/^on/i.test(name)) { return; }
|
||||
var value = origin.attributes[i].value;
|
||||
dest.setAttribute(name, value);
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user