As anchor elements cannot load things into the current browsing
context and are not necessarily more dangerous to users compared to
HTTP(S) links, which we allowed since adding markdown rendering in
the first place.
Allows adding short-cuts for virtual guest resources, like RDP or SSH
links.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
let url = new URL(value, window.location.origin);
if (
_isHTTPLike(url.protocol) ||
+ node.tagName.toLowerCase() === 'a' ||
(node.tagName.toLowerCase() === 'img' && url.protocol.toLowerCase() === 'data:')
) {
node.attributes[i].value = url.href;