Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix escaping of regexps #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions RFLink_ESP/RFLink_ESP.ino
Original file line number Diff line number Diff line change
Expand Up @@ -318,39 +318,39 @@ static const char AUX_settings[] PROGMEM = R"raw(
"type": "ACInput",
"value": "RFlink-ESP",
"label": "Hostname",
"pattern": "^\d*[a-z][a-z0-9!^(){}\-_~]*$"
"pattern": "^\\d*[a-z][a-z0-9!^(){}\\-_~]*$"

},
{
"name": "Adv_NTPserver1",
"type": "ACInput",
"value": "",
"label": "@NTP server 1",
"pattern": "^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$",
"pattern": "^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\-]*[A-Za-z0-9])$",
"placeholder": "pool.ntp.org if empty"
},
{
"name": "Adv_NTPserver2",
"type": "ACInput",
"value": "",
"label": "@NTP server 2",
"pattern": "^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$",
"pattern": "^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\-]*[A-Za-z0-9])$",
"placeholder": "time.nist.gov if empty"
},
{
"name": "GMT",
"type": "ACInput",
"value": "",
"label": "Timezone (GMT)",
"pattern": "^[-+]?[1-9]\d*\.?[0]*$",
"pattern": "^[-+]?[1-9]\\d*\\.?[0]*$",
"placeholder": "between -12 and +14"
},
{
"name": "DST",
"type": "ACInput",
"value": "",
"label": "DST",
"pattern": "^[-+]?[1-9]\d*\.?[0]*$",
"pattern": "^[-+]?[1-9]\\d*\\.?[0]*$",
"placeholder": "Daylight Saving Time in minutes"
},
{
Expand Down Expand Up @@ -513,8 +513,8 @@ String saveParams(AutoConnectAux& aux, PageArgument& args) {
// Echo back saved parameters to AutoConnectAux page.
AutoConnectText& echo = aux["parameters"].as<AutoConnectText>();
echo.value += "MQTT Enabled: " + String(Mqtt_Enabled == true ? "true" : "false") + "<br>";
echo.value = "Server: " + serverName;
echo.value = " Port: " + Mqtt_Port;
echo.value += "Server: " + serverName + "<br>";
echo.value += " Port: " + Mqtt_Port + "<br>";
echo.value += "<br>USername: " + Mqtt_Username + "<br>";
echo.value += "Password: " + Mqtt_Password + "<br>";
echo.value += "Topic: " + Mqtt_Topic + "<br><br>";
Expand Down