diff --git a/dargs/notebook.py b/dargs/notebook.py index dce5f77..c60c366 100644 --- a/dargs/notebook.py +++ b/dargs/notebook.py @@ -19,6 +19,7 @@ from __future__ import annotations +import html import json import re from typing import Any @@ -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("