From 595624c4cf8437f05107b24b0909af0e8df67ce8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 23 Jul 2024 15:50:53 +0200 Subject: [PATCH] Add 'target' attribute to the Bleach allowed attributes (#911) (#912) Co-authored-by: wlorenzetti (cherry picked from commit 452edb93e1fcb4a77f0749f17b52528f509e6773) Co-authored-by: Walter Lorenzetti --- g3w-admin/base/settings/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/g3w-admin/base/settings/base.py b/g3w-admin/base/settings/base.py index 752ac827f..e56b4a5a7 100644 --- a/g3w-admin/base/settings/base.py +++ b/g3w-admin/base/settings/base.py @@ -359,7 +359,7 @@ BLEACH_ALLOWED_TAGS = ['p', 'b', 'i', 'u', 'em', 'strong', 'a', 'br', 'table', 'tr', 'td', 'th', 'b', 'ul', 'li', 'ol', 'div', 'h1', 'h2', 'h3', 'h4', 'h5', 'pre', 'blockquote', 'tbody', 'theader', 'tfooter', 'span'] BLEACH_STRIP_TAGS = True -BLEACH_ALLOWED_ATTRIBUTES = ['href', 'title', 'style', 'src'] +BLEACH_ALLOWED_ATTRIBUTES = ['href', 'title', 'style', 'src', 'target'] BLEACH_ALLOWED_STYLES = [ 'background-color', 'color', 'font-size' ]