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'
None
1 parent dc7bec0 commit 4ec080eCopy full SHA for 4ec080e
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