RTF Output: Fix bug that broke conversion to RTF when the input document contains <img> tags with no src attribute.

This commit is contained in:
Kovid Goyal 2012-03-17 10:35:06 +05:30
parent 68216a0f7f
commit 402d28a8f0

View File

@ -234,6 +234,8 @@ class RTFMLizer(object):
# Process tags that need special processing and that do not have inner
# text. Usually these require an argument
if tag == 'img':
src = elem.get('src')
if src:
src = os.path.basename(elem.get('src'))
block_start = ''
block_end = ''