Refactor EventContent

Use proper layouts and get rid of multiple annoyances/bugs like
text-wrapping randomly happening in the middle of words, background
rectangles being too large, a certain binding loop, etc
This commit is contained in:
miruka
2019-09-19 15:49:29 -04:00
parent 4c4d747ecf
commit d20ab5a348
11 changed files with 183 additions and 139 deletions

View File

@@ -44,6 +44,5 @@ def guess_mime(file: IO) -> Optional[str]:
def plain2html(text: str) -> str:
return html.escape(text)\
.replace(" ", " ")\
.replace("\n", "<br>")\
.replace("\t", "&nbsp;" * 4)