forked from MarseyWorld/MarseyWorld
add tabs
parent
18fdd429bf
commit
23d77a165a
|
@ -85,8 +85,14 @@ def bleach_body_html(body_html, runtime=False):
|
|||
attributes=allowed_attributes,
|
||||
protocols=['http', 'https'],
|
||||
css_sanitizer=css_sanitizer,
|
||||
filters=[partial(LinkifyFilter, skip_tags=["pre"],
|
||||
parse_email=False, url_re=sanitize_url_regex)]
|
||||
filters=[
|
||||
partial(
|
||||
LinkifyFilter,
|
||||
skip_tags=["pre"],
|
||||
parse_email=False,
|
||||
url_re=sanitize_url_regex
|
||||
)
|
||||
]
|
||||
).clean(body_html)
|
||||
|
||||
return body_html
|
||||
|
|
|
@ -652,7 +652,12 @@ def filter_emojis_only(title, golden=True, count_emojis=False, obj=None, author=
|
|||
|
||||
title = strikethrough_regex.sub(r'\1<del>\2</del>', title)
|
||||
|
||||
title = bleach.clean(title, tags=['img','del','span'], attributes=allowed_attributes_emojis, protocols=['http','https']).replace('\n','')
|
||||
title = bleach.clean(
|
||||
title,
|
||||
tags=['img','del','span'],
|
||||
attributes=allowed_attributes_emojis,
|
||||
protocols=['http','https']
|
||||
).replace('\n','')
|
||||
|
||||
if len(title) > POST_TITLE_HTML_LENGTH_LIMIT:
|
||||
abort(400, "Rendered title is too long!")
|
||||
|
|
Loading…
Reference in New Issue