From 923b4e0948b9cbc2a245985e5b4f0a77f2567a86 Mon Sep 17 00:00:00 2001 From: Brendan Howell Date: Wed, 26 Feb 2020 12:50:37 +0100 Subject: [PATCH] fix for visible html showing up on small printer --- screenless/bureau/publicrelations/publicrelations.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/screenless/bureau/publicrelations/publicrelations.py b/screenless/bureau/publicrelations/publicrelations.py index dafaacd..33ca4db 100644 --- a/screenless/bureau/publicrelations/publicrelations.py +++ b/screenless/bureau/publicrelations/publicrelations.py @@ -311,7 +311,8 @@ class PublicRelations(Bureau): prn._raw(username) prn.text("\r\n") prn.set(text_type="NORMAL") - ttext = bleach.clean(t.content, strip=True) + ttext = bleach.clean(t.content, tags=[], strip=True) + ttext = html.unescape(ttext) t_wrapped = textwrap.fill(ttext, width=48) + "\r\n" t_enc = t_wrapped.encode("cp437", "ignore") prn._raw(t_enc)