remove extra line feeds from html comments when sanitizing

This commit is contained in:
ldolse 2010-11-17 13:49:12 +08:00
parent 26ba75f76c
commit a55b4dbbac

View File

@ -131,7 +131,8 @@ def comments_to_html(comments):
def sanitize_comments_html(html):
text = html2text(html)
md = markdown.Markdown(safe_mode=True)
return md.convert(text)
cleansed = re.sub('\n+', '', md.convert(text))
return cleansed
def test():
for pat, val in [