diff --git a/src/docgen/ODSTab.py b/src/docgen/ODSTab.py index 057f11faa..bdc4cc697 100644 --- a/src/docgen/ODSTab.py +++ b/src/docgen/ODSTab.py @@ -385,12 +385,13 @@ class ODSTab(TabbedDoc): self.f.write('>\n') self.f.write('') - text = text.replace('&','&') # Must be first - text = text.replace('<','<') - text = text.replace('>','>') - text = text.replace('\t','') - text = text.replace('\n','') - self.f.write(unicode(text)) + if text is not None: # it must not be just 'if text' + text = text.replace('&','&') # Must be first + text = text.replace('<','<') + text = text.replace('>','>') + text = text.replace('\t','') + text = text.replace('\n','') + self.f.write(unicode(text)) self.f.write('\n') self.f.write('\n')