Fix #4108 (Bug when convertinf an LRF file to MOBI)

This commit is contained in:
Kovid Goyal 2009-11-30 12:53:03 -07:00
parent 7e45095b00
commit de0631f927
2 changed files with 6 additions and 2 deletions

View File

@ -55,6 +55,9 @@
- title: "LIT Input: Remove more invalid markup present in LIT files created by Microsoft Word plugins"
tickets: [4087]
- title: "LRF Input: Workaround buggy LRF files with unbalanced closing tags"
tickets: [4108]
new recipes:
- title: The Economist (no subscription required)
author: Kovid Goyal

View File

@ -872,8 +872,9 @@ class Text(LRFStream):
if isinstance(c, basestring):
s += c
elif c is None:
p = open_containers.pop()
s += u'</%s>'%(p.name,)
if open_containers:
p = open_containers.pop()
s += u'</%s>'%(p.name,)
else:
s += unicode(c)
if not c.self_closing: