We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
None
1 parent dc7bec0 commit 6858cefCopy full SHA for 6858cef
adafruit_httpserver/interfaces.py
@@ -65,8 +65,11 @@ def __repr__(self) -> str:
65
return f"{self.__class__.__name__}({repr(self._storage)})"
66
67
68
-def _encode_html_entities(value: str) -> str:
+def _encode_html_entities(value: Union[str, None]) -> Union[str, None]:
69
"""Encodes unsafe HTML characters that could enable XSS attacks."""
70
+ if value is None:
71
+ return None
72
+
73
return (
74
str(value)
75
.replace("&", "&")
0 commit comments