Skip to content

Commit

Permalink
Fix bug in create_html_page - undefined variable (#8700)
Browse files Browse the repository at this point in the history
  • Loading branch information
asherf authored and jsirois committed Nov 25, 2019
1 parent 9f8cb1e commit 5530b4f
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,11 @@ def create_html_page(self, space, title, html, parent_page=None, **pageoptions):
if self._content_format == 'markdown':
content = '{html}\n\n%s\n\n{html}' % html
elif self._content_format == 'xhtml':
content = '''<ac:macro ac:name="html">
<ac:plain-text-body><![CDATA[%s]]></ac:plain-text-body>
</ac:macro>''' % html
content = f'''<ac:macro ac:name="html">
<ac:plain-text-body><![CDATA[{html}]]></ac:plain-text-body>
</ac:macro>'''
else:
raise ConfluenceError("Don't know how to convert %s to HTML" % format)
raise ConfluenceError(f"Don't know how to convert {self._content_format} to HTML")
return self.create(space, title, content, parent_page, **pageoptions)

def addattachment(self, page, filename):
Expand Down

0 comments on commit 5530b4f

Please sign in to comment.