Skip to content
Snippets Groups Projects
Commit 4f9aa696 authored by Hugo Hörnquist's avatar Hugo Hörnquist
Browse files

Fix HTML rendering escaping.

parent 8bd6c351
Branches
No related tags found
No related merge requests found
......@@ -10,6 +10,7 @@ from . import (
render,
)
from collections.abc import Sequence
import html
class HTMLRenderer(Renderer):
......@@ -68,5 +69,5 @@ class HTMLRenderer(Renderer):
return ' ' * ind.depth * 2
def render_str(self, s: str) -> str:
"""Return the given string verbatim."""
return s
"""HTML escape and return the given string."""
return html.escape(s)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment