mirror of
https://github.com/evennia/evennia.git
synced 2026-03-28 18:47:16 +01:00
Fixed a regression introduced in rev eb2bd8d that made the webclient fail when loading text2html.
This commit is contained in:
parent
873c46ed8c
commit
d5f70b6524
1 changed files with 9 additions and 9 deletions
|
|
@ -211,17 +211,17 @@ class TextToHTMLparser(object):
|
|||
text (str): Processed text.
|
||||
|
||||
"""
|
||||
c = m.groupdict()
|
||||
if c['htmlchars']:
|
||||
return cgi.escape(c['htmlchars'])
|
||||
if c['lineend']:
|
||||
cdict = match.groupdict()
|
||||
if cdict['htmlchars']:
|
||||
return cgi.escape(cdict['htmlchars'])
|
||||
if cdict['lineend']:
|
||||
return '<br>'
|
||||
elif c['space'] == '\t':
|
||||
elif cdict['space'] == '\t':
|
||||
return ' ' * self.tabstop
|
||||
elif c['space']:
|
||||
t = m.group().replace('\t', ' ' * self.tabstop)
|
||||
t = t.replace(' ', ' ')
|
||||
return t
|
||||
elif cdict['space']:
|
||||
text = match.group().replace('\t', ' ' * self.tabstop)
|
||||
text = text.replace(' ', ' ')
|
||||
return text
|
||||
|
||||
def parse(self, text, strip_ansi=False):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue