Correctly escape document information

This commit is contained in:
RunasSudo 2019-12-15 14:08:53 +11:00
parent da6a35b0d6
commit d4fa0ae689
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A
2 changed files with 6 additions and 6 deletions

View File

@ -316,7 +316,7 @@ class LaTeXRenderer(mistletoe.latex_renderer.LaTeXRenderer):
return format(template,
inner=self.render_inner(token),
packages=self.render_packages(),
title=token.title,
author=token.author,
footer=token.footer
title=self.render_raw_text(mistletoe.span_token.RawText(token.title)),
author=self.render_raw_text(mistletoe.span_token.RawText(token.author)),
footer=self.render_raw_text(mistletoe.span_token.RawText(token.footer))
)

View File

@ -276,9 +276,9 @@ class RTFRenderer(mistletoe.base_renderer.BaseRenderer):
flushright=cm_to_twip(21 - 2 - 2),
parskip=cm_to_twip(0.35),
inner=self.render_inner(token),
title=token.title,
author=token.author,
footer=token.footer
title=self.render_raw_text(mistletoe.span_token.RawText(token.title)),
author=self.render_raw_text(mistletoe.span_token.RawText(token.author)),
footer=self.render_raw_text(mistletoe.span_token.RawText(token.footer))
)
result = []