Compare commits
2 commits
37d5a7a20d
...
0ca50252dd
Author | SHA1 | Date | |
---|---|---|---|
0ca50252dd | |||
8d79be07da |
4 changed files with 872 additions and 674 deletions
5
Pipfile
5
Pipfile
|
@ -56,3 +56,8 @@ pytest-django = "*"
|
||||||
werkzeug = "*"
|
werkzeug = "*"
|
||||||
watchdog = "*"
|
watchdog = "*"
|
||||||
mypy = "*"
|
mypy = "*"
|
||||||
|
types-pyyaml = "*"
|
||||||
|
types-requests = "*"
|
||||||
|
types-python-slugify = "*"
|
||||||
|
types-bleach = "*"
|
||||||
|
types-markdown = "*"
|
||||||
|
|
1525
Pipfile.lock
generated
1525
Pipfile.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -5,10 +5,10 @@ from jinja2 import evalcontextfilter, Markup
|
||||||
TAGS = ['cite', 'code', 'details', 'p', 'pre', 'img', 'span', 'summary']
|
TAGS = ['cite', 'code', 'details', 'p', 'pre', 'img', 'span', 'summary']
|
||||||
TAGS.extend(ALLOWED_TAGS)
|
TAGS.extend(ALLOWED_TAGS)
|
||||||
ATTRIBUTES = {
|
ATTRIBUTES = {
|
||||||
'a': ('href', 'title', 'class'),
|
'a': ['href', 'title', 'class'],
|
||||||
'details': ('open',),
|
'details': ['open'],
|
||||||
'img': ('alt', 'src', 'title'),
|
'img': ['alt', 'src', 'title'],
|
||||||
'span': ('class',),
|
'span': ['class'],
|
||||||
}
|
}
|
||||||
|
|
||||||
cleaner = Cleaner(tags=TAGS, attributes=ATTRIBUTES, filters=(LinkifyFilter,))
|
cleaner = Cleaner(tags=TAGS, attributes=ATTRIBUTES, filters=(LinkifyFilter,))
|
||||||
|
|
|
@ -8,10 +8,10 @@ from bleach.linkifier import LinkifyFilter
|
||||||
tags = ['cite', 'code', 'details', 'p', 'pre', 'img', 'span', 'summary']
|
tags = ['cite', 'code', 'details', 'p', 'pre', 'img', 'span', 'summary']
|
||||||
tags.extend(ALLOWED_TAGS)
|
tags.extend(ALLOWED_TAGS)
|
||||||
attributes = {
|
attributes = {
|
||||||
'a': ('href', 'title', 'class'),
|
'a': ['href', 'title', 'class'],
|
||||||
'details': ('open',),
|
'details': ['open'],
|
||||||
'img': ('alt', 'src', 'title'),
|
'img': ['alt', 'src', 'title'],
|
||||||
'span': ('class',),
|
'span': ['class'],
|
||||||
}
|
}
|
||||||
|
|
||||||
register = template.Library()
|
register = template.Library()
|
||||||
|
|
Loading…
Reference in a new issue