From 738580eeeb8e6ab269cf33c077bfb89453244ad5 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Thu, 7 May 2020 17:51:21 -0400 Subject: [PATCH] annotations: escape more inputs --- gitsrht/annotations.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gitsrht/annotations.py b/gitsrht/annotations.py index 0420bcf..47e11cd 100644 --- a/gitsrht/annotations.py +++ b/gitsrht/annotations.py @@ -239,13 +239,13 @@ class AnnotatedFormatter(_BaseFormatter): target = self.link_prefix + "/" + target if start <= colno < end: if color is not None: - return (f"{escape_html(token)}""") else: - return (f"{escape_html(token)}""") @@ -256,7 +256,7 @@ class AnnotatedFormatter(_BaseFormatter): content = anno["content"] content = markdown(content, baselevel=6, link_prefix=self.link_prefix) - annotation = f"
{title}{content}
\n" + annotation = f"
{escape_html(title)}{content}
\n" token = escape_html(token).replace("\n", annotation, 1) return token # Other types? -- 2.38.4