fixed crash with invalid format in webserver settings

This commit is contained in:
2021-09-23 21:10:21 +02:00
parent cd6713ac92
commit 313db2ad68

View File

@ -79,7 +79,7 @@ typename std::enable_if<
, bool>::type , bool>::type
showInputForSetting(std::string_view key, T value, std::string &body) showInputForSetting(std::string_view key, T value, std::string &body)
{ {
body += fmt::format("<input type=\"text\" name=\"{}{}{}{}\" value=\"{}\" pattern=\"[0-9]{4}\" required />", body += fmt::format("<input type=\"text\" name=\"{}\" value=\"{}{}{}{}\" pattern=\"[0-9]{{4}}\" required />",
esphttpdutils::htmlentities(key), esphttpdutils::htmlentities(key),
value[0], value[0],
value[1], value[1],