Escape < and > in escHtml to prevent stored XSS

This commit is contained in:
2026-06-27 01:44:32 +02:00
parent eafdf87563
commit acf63a3753
+2
View File
@@ -391,6 +391,8 @@ static String escHtml(const String& s) {
char c = s.charAt(i);
switch (c) {
case '&': out += "&amp;"; break;
case '<': out += "&lt;"; break;
case '>': out += "&gt;"; break;
case '\'': out += "&#39;"; break;
case '"': out += "&quot;"; break;
default: out += c;