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.
|
text (str): Processed text.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
c = m.groupdict()
|
cdict = match.groupdict()
|
||||||
if c['htmlchars']:
|
if cdict['htmlchars']:
|
||||||
return cgi.escape(c['htmlchars'])
|
return cgi.escape(cdict['htmlchars'])
|
||||||
if c['lineend']:
|
if cdict['lineend']:
|
||||||
return '<br>'
|
return '<br>'
|
||||||
elif c['space'] == '\t':
|
elif cdict['space'] == '\t':
|
||||||
return ' ' * self.tabstop
|
return ' ' * self.tabstop
|
||||||
elif c['space']:
|
elif cdict['space']:
|
||||||
t = m.group().replace('\t', ' ' * self.tabstop)
|
text = match.group().replace('\t', ' ' * self.tabstop)
|
||||||
t = t.replace(' ', ' ')
|
text = text.replace(' ', ' ')
|
||||||
return t
|
return text
|
||||||
|
|
||||||
def parse(self, text, strip_ansi=False):
|
def parse(self, text, strip_ansi=False):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue