aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorcitrons <citrons>2021-06-23 19:02:02 +0000
committercitrons <citrons>2021-06-23 19:02:02 +0000
commit80b0827308acc189b6e2ffece65c5b84665ea5f1 (patch)
tree46e04a01f4a26f075ec41399f0aad3db98304188
parent3123da15bf59e866e3f7d65bee3585c85c61fe97 (diff)
colors for markdown
-rw-r--r--apioforum/mdrender.py7
-rw-r--r--apioforum/templates/base.html1
2 files changed, 7 insertions, 1 deletions
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 @@
<title>{%block title %}{% endblock %}</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/static/style.css">
+ <link rel="stylesheet" href="/static/md-colors.css">
<link rel="icon" href="//gh0.pw/favicon.ico">
</head>
<body>