Skip to content

Commit 1c49b25

Browse files
committed
docs(polytext): update deprecation message for html_escape method
Updates the deprecation warning to recommend using html.escape directly from the html library instead of suggesting the Markup class. This provides clearer guidance to users about the preferred alternative for HTML escaping functionality.
1 parent cc132b3 commit 1c49b25

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/polykit/text/polytext.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def _escape_html(self, text: str) -> str:
9999
def _strip_html(self, text: str) -> str:
100100
return text if self != PolyText.HTML else re.sub(r"<[^>]*>", "", text)
101101

102-
@deprecated("Use Markup class instead.")
102+
@deprecated("Use html.escape directly from the html library instead!")
103103
@staticmethod
104104
def html_escape(text: str) -> str:
105105
"""Use the escape method directly from the HTML library."""

0 commit comments

Comments
 (0)