This commit is contained in:
Kovid Goyal 2007-08-24 03:45:30 +00:00
parent 61f84a63fc
commit fbb1891812

View File

@ -1215,7 +1215,7 @@ class HTMLConverter(object):
if tag.contents: if tag.contents:
c = tag.contents[0] c = tag.contents[0]
if isinstance(c, NavigableString): if isinstance(c, NavigableString):
c = str(c).replace('\r\n', '\n').replace('\r', '\n') c = unicode(c).replace('\r\n', '\n').replace('\r', '\n')
if c.startswith('\n'): if c.startswith('\n'):
c = c[1:] c = c[1:]
tag.contents[0] = NavigableString(c) tag.contents[0] = NavigableString(c)