Merge branch '2654_sandbox' into release/8.14.0

This commit is contained in:
Knut Sveidqvist
2022-01-28 14:46:23 +01:00
8 changed files with 138 additions and 32 deletions

View File

@@ -506,7 +506,9 @@ export const draw = function (text, id) {
link.setAttributeNS('http://www.w3.org/2000/svg', 'class', vertex.classes.join(' '));
link.setAttributeNS('http://www.w3.org/2000/svg', 'href', vertex.link);
link.setAttributeNS('http://www.w3.org/2000/svg', 'rel', 'noopener');
if (vertex.linkTarget) {
if (securityLevel === 'sandbox') {
link.setAttributeNS('http://www.w3.org/2000/svg', 'target', '_top');
} else if (vertex.linkTarget) {
link.setAttributeNS('http://www.w3.org/2000/svg', 'target', vertex.linkTarget);
}