Skip to content

Commit c165c59

Browse files
authored
fix: fix html escape in the notebook (#85)
1 parent 60ab52c commit c165c59

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

dargs/notebook.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
from __future__ import annotations
2121

22+
import html
2223
import json
2324
import re
2425
from typing import Any
@@ -249,7 +250,7 @@ def print_html(self, _level=0, _last_one=True):
249250
else:
250251
raise ValueError(f"Unknown type: {type(self.arg)}")
251252

252-
doc_body = self.arg.doc.strip()
253+
doc_body = html.escape(self.arg.doc.strip())
253254
if doc_body:
254255
buff.append("<hr/>")
255256
doc_body = re.sub(r"""\n+""", "\n", doc_body)

0 commit comments

Comments
 (0)