From 80b0827308acc189b6e2ffece65c5b84665ea5f1 Mon Sep 17 00:00:00 2001 From: citrons Date: Wed, 23 Jun 2021 19:02:02 +0000 Subject: colors for markdown --- apioforum/mdrender.py | 7 ++++++- apioforum/templates/base.html | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/apioforum/mdrender.py b/apioforum/mdrender.py index 8c59c42..715617e 100644 --- a/apioforum/mdrender.py +++ b/apioforum/mdrender.py @@ -1,4 +1,5 @@ import bleach +from .csscolors import csscolors allowed_tags = [ 'p', @@ -12,9 +13,13 @@ allowed_tags = [ 'del', 'mark', 'img', - 'marquee' + 'marquee', + 'pulsate' ] +allowed_tags += csscolors +allowed_tags += ("mark" + c for c in csscolors) + allowed_attributes = bleach.sanitizer.ALLOWED_ATTRIBUTES.copy() allowed_attributes.update( img='src', diff --git a/apioforum/templates/base.html b/apioforum/templates/base.html index 637cc09..33e49f6 100644 --- a/apioforum/templates/base.html +++ b/apioforum/templates/base.html @@ -6,6 +6,7 @@ {%block title %}{% endblock %} + -- cgit v1.2.3