fix for visible html showing up on small printer

workspace
Brendan Howell 4 years ago
parent 4a8b1e1d58
commit 923b4e0948

@ -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)

Loading…
Cancel
Save