Unescape html escape sequences
Python has a handy module for this, so let's use it to fix escape codes in messages. Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This commit is contained in:
parent
3ae8ce02b5
commit
01a61db2f8
|
@ -5,6 +5,7 @@ from . import api
|
||||||
from . import auth
|
from . import auth
|
||||||
from . import users
|
from . import users
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
import html
|
||||||
import textwrap
|
import textwrap
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
@ -65,7 +66,7 @@ class Message:
|
||||||
line = line.replace("[#####]", "[%s]" % count, 1)
|
line = line.replace("[#####]", "[%s]" % count, 1)
|
||||||
count += 1
|
count += 1
|
||||||
|
|
||||||
lines += [ "" ] + textwrap.wrap(line)
|
lines += [ "" ] + textwrap.wrap(html.unescape(line))
|
||||||
links += link
|
links += link
|
||||||
|
|
||||||
if len(lines) == 0:
|
if len(lines) == 0:
|
||||||
|
|
Loading…
Reference in New Issue