Skip to content

Commit

Permalink
Added escaping of quotes in page footer and header components to avoi…
Browse files Browse the repository at this point in the history
…d issues when building quoted CSS content strings from the components. Fixes issue #544.

 - Legacy-Id: 3798
  • Loading branch information
levkowetz committed Sep 7, 2020
1 parent dec8149 commit 92863da
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cli/xml2rfc/writers/pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ def pdf(self):
'bottom-center': self.page_bottom_center(),
'fonts': ', '.join(fonts),
}
for (k,v) in page_info.items():
page_info[k] = v.replace("'", r"\'")
page_css_text = page_css_template.format(**page_info)
page_css = weasyprint.CSS(string=page_css_text)

Expand Down

0 comments on commit 92863da

Please sign in to comment.