Commit 6f9680cb authored by Romain Courteaud's avatar Romain Courteaud

erp5_core: domsugar automatically patch the _blank security hole

parent 7e54bbcb
......@@ -130,6 +130,16 @@
}
}
}
if ((el.tagName === 'A') &&
(props.target === '_blank')) {
// Fix security hole with `noopener`
if (!el.relList.contains('noopener')) {
el.relList.add('noopener');
}
if (!el.relList.contains('noreferrer')) {
el.relList.add('noreferrer');
}
}
if (children) {
appendChildren(el, children);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment