Conversion: Convert <br> tags with text in them into <divs> as ADE cannot handle them. Fixes #794427 (Private bug)

This commit is contained in:
Kovid Goyal 2011-06-18 00:11:15 -06:00
parent 51546075f4
commit 6d2208759c

View File

@ -1055,6 +1055,12 @@ class Manifest(object):
and len(a) == 0 and not a.text: and len(a) == 0 and not a.text:
remove_elem(a) remove_elem(a)
# Convert <br>s with content into paragraphs as ADE can't handle
# them
for br in xpath(data, '//h:br'):
if len(br) > 0 or br.text:
br.tag = XHTML('div')
return data return data
def _parse_txt(self, data): def _parse_txt(self, data):