mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-21 03:42:16 +00:00
fix(editor): Render sanitized HTML content in toast messages (#12139)
This commit is contained in:
@@ -18,8 +18,8 @@ export function sanitizeHtml(dirtyHtml: string) {
|
||||
}
|
||||
|
||||
if (ALLOWED_HTML_ATTRIBUTES.includes(name) || name.startsWith('data-')) {
|
||||
// href is allowed but we need to sanitize certain protocols
|
||||
if (name === 'href' && !value.match(/^https?:\/\//gm)) {
|
||||
// href is allowed but we allow only https and relative URLs
|
||||
if (name === 'href' && !value.match(/^https?:\/\//gm) && !value.startsWith('/')) {
|
||||
return '';
|
||||
}
|
||||
return `${name}="${escapeAttrValue(value)}"`;
|
||||
|
||||
Reference in New Issue
Block a user