Add rel="noreferrer" to created links in received messages

This commit is contained in:
schlagmichdoch 2024-08-31 00:55:18 +02:00 committed by GitHub
parent ab67c5858d
commit 40379acc6c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2101,7 +2101,7 @@ class ReceiveTextDialog extends Dialog {
let linkNodePlaceholder = `${p}${m}`; let linkNodePlaceholder = `${p}${m}`;
// add linkNodePlaceholder to text node and save a reference to linkNodes object // add linkNodePlaceholder to text node and save a reference to linkNodes object
linkNodes[linkNodePlaceholder] = `<a href="${link}" target="_blank">${url}</a>`; linkNodes[linkNodePlaceholder] = `<a href="${link}" target="_blank" rel="noreferrer">${url}</a>`;
return `${whitespaceOrSpecial}${linkNodePlaceholder}`; return `${whitespaceOrSpecial}${linkNodePlaceholder}`;
} }
// link is not valid -> do not replace // link is not valid -> do not replace