Decode HTML entities in comments, make blockquotes smaller

Flask escapes < > etc, and the markdown parser does not consider
&gt; as > aka blockquote. Fixed by decoding HTML source before
rendering markdown.
This commit is contained in:
TheAMM
2017-11-10 02:12:08 +02:00
parent f6735219f0
commit 0b094a7229
3 changed files with 22 additions and 6 deletions

View File

@@ -182,7 +182,7 @@ class DisabledSelectField(SelectField):
class CommentForm(FlaskForm):
comment = TextAreaField('Make a comment', [
Length(min=3, max=1024, message='Comment must be at least %(min)d characters '
Length(min=3, max=2048, message='Comment must be at least %(min)d characters '
'long and %(max)d at most.'),
DataRequired(message='Comment must not be empty.')
])