markdown parser: normalize tag names and protocol for check
As the tag names are often uppercase, and so this was overly strict and didn't always match correctly Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
28f879c09e
commit
b0c7069a10
@ -32,7 +32,10 @@ Ext.define('Proxmox.Markdown', {
|
||||
} else if ((name === 'href' || name === 'src') && !_isHTTPLike(value)) {
|
||||
try {
|
||||
let url = new URL(value, window.location.origin);
|
||||
if (_isHTTPLike(url.protocol) || (node.tagName === 'img' && url.protocol === 'data:')) {
|
||||
if (
|
||||
_isHTTPLike(url.protocol) ||
|
||||
(node.tagName.toLowerCase() === 'img' && url.protocol.toLowerCase() === 'data:')
|
||||
) {
|
||||
node.attributes[i].value = url.href;
|
||||
} else {
|
||||
node.attributes.removeNamedItem(name);
|
||||
|
Loading…
x
Reference in New Issue
Block a user