Skip to content

Commit

Permalink
fix: fix html escape in the notebook (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
njzjz authored Nov 20, 2024
1 parent 60ab52c commit c165c59
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dargs/notebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

from __future__ import annotations

import html
import json
import re
from typing import Any
Expand Down Expand Up @@ -249,7 +250,7 @@ def print_html(self, _level=0, _last_one=True):
else:
raise ValueError(f"Unknown type: {type(self.arg)}")

doc_body = self.arg.doc.strip()
doc_body = html.escape(self.arg.doc.strip())
if doc_body:
buff.append("<hr/>")
doc_body = re.sub(r"""\n+""", "\n", doc_body)
Expand Down

0 comments on commit c165c59

Please sign in to comment.