mirror of https://github.com/arendst/Tasmota.git
Fix the GUI display of apostrophe
Fix the GUI display of apostrophe in any name (#8489, #8323)
This commit is contained in:
parent
089379ccb6
commit
f1205385bd
|
@ -428,18 +428,18 @@ const char HTTP_FORM_MODULE[] PROGMEM =
|
|||
const char HTTP_FORM_WIFI[] PROGMEM =
|
||||
"<fieldset><legend><b> " D_WIFI_PARAMETERS " </b></legend>"
|
||||
"<form method='get' action='wi'>"
|
||||
"<p><b>" D_AP1_SSID "</b> (" STA_SSID1 ")<br><input id='s1' placeholder='" STA_SSID1 "' value='%s'></p>"
|
||||
"<p><label><b>" D_AP1_PASSWORD "</b><input type='checkbox' onclick='sp(\"p1\")'></label><br><input id='p1' type='password' placeholder='" D_AP1_PASSWORD "' value='" D_ASTERISK_PWD "'></p>"
|
||||
"<p><b>" D_AP2_SSID "</b> (" STA_SSID2 ")<br><input id='s2' placeholder='" STA_SSID2 "' value='%s'></p>"
|
||||
"<p><label><b>" D_AP2_PASSWORD "</b><input type='checkbox' onclick='sp(\"p2\")'></label><br><input id='p2' type='password' placeholder='" D_AP2_PASSWORD "' value='" D_ASTERISK_PWD "'></p>"
|
||||
"<p><b>" D_HOSTNAME "</b> (%s)<br><input id='h' placeholder='%s' value='%s'></p>"
|
||||
"<p><b>" D_CORS_DOMAIN "</b><input id='c' placeholder='" CORS_DOMAIN "' value='%s'></p>";
|
||||
"<p><b>" D_AP1_SSID "</b> (" STA_SSID1 ")<br><input id='s1' placeholder=\"" STA_SSID1 "\" value=\"%s\"></p>" // Need \" instead of ' to be able to use ' in text (#8489)
|
||||
"<p><label><b>" D_AP1_PASSWORD "</b><input type='checkbox' onclick='sp(\"p1\")'></label><br><input id='p1' type='password' placeholder=\"" D_AP1_PASSWORD "\" value=\"" D_ASTERISK_PWD "\"></p>"
|
||||
"<p><b>" D_AP2_SSID "</b> (" STA_SSID2 ")<br><input id='s2' placeholder=\"" STA_SSID2 "\" value=\"%s\"></p>"
|
||||
"<p><label><b>" D_AP2_PASSWORD "</b><input type='checkbox' onclick='sp(\"p2\")'></label><br><input id='p2' type='password' placeholder=\"" D_AP2_PASSWORD "\" value=\"" D_ASTERISK_PWD "\"></p>"
|
||||
"<p><b>" D_HOSTNAME "</b> (%s)<br><input id='h' placeholder=\"%s\" value=\"%s\"></p>"
|
||||
"<p><b>" D_CORS_DOMAIN "</b><input id='c' placeholder=\"" CORS_DOMAIN "\" value=\"%s\"></p>";
|
||||
|
||||
const char HTTP_FORM_LOG1[] PROGMEM =
|
||||
"<fieldset><legend><b> " D_LOGGING_PARAMETERS " </b>"
|
||||
"</legend><form method='get' action='lg'>";
|
||||
const char HTTP_FORM_LOG2[] PROGMEM =
|
||||
"<p><b>" D_SYSLOG_HOST "</b> (" SYS_LOG_HOST ")<br><input id='lh' placeholder='" SYS_LOG_HOST "' value='%s'></p>"
|
||||
"<p><b>" D_SYSLOG_HOST "</b> (" SYS_LOG_HOST ")<br><input id='lh' placeholder=\"" SYS_LOG_HOST "\" value=\"%s\"></p>"
|
||||
"<p><b>" D_SYSLOG_PORT "</b> (" STR(SYS_LOG_PORT) ")<br><input id='lp' placeholder='" STR(SYS_LOG_PORT) "' value='%d'></p>"
|
||||
"<p><b>" D_TELEMETRY_PERIOD "</b> (" STR(TELE_PERIOD) ")<br><input id='lt' placeholder='" STR(TELE_PERIOD) "' value='%d'></p>";
|
||||
|
||||
|
@ -448,15 +448,15 @@ const char HTTP_FORM_OTHER[] PROGMEM =
|
|||
"<form method='get' action='co'>"
|
||||
"<p></p>"
|
||||
"<fieldset><legend><b> " D_TEMPLATE " </b></legend>"
|
||||
"<p><input id='t1' placeholder='" D_TEMPLATE "' value='%s'></p>"
|
||||
"<p><input id='t1' placeholder=\"" D_TEMPLATE "\" value=\"%s\"></p>"
|
||||
"<p><label><input id='t2' type='checkbox'%s><b>" D_ACTIVATE "</b></label></p>"
|
||||
"</fieldset>"
|
||||
"<br>"
|
||||
"<label><b>" D_WEB_ADMIN_PASSWORD "</b><input type='checkbox' onclick='sp(\"wp\")'></label><br><input id='wp' type='password' placeholder='" D_WEB_ADMIN_PASSWORD "' value='" D_ASTERISK_PWD "'><br>"
|
||||
"<label><b>" D_WEB_ADMIN_PASSWORD "</b><input type='checkbox' onclick='sp(\"wp\")'></label><br><input id='wp' type='password' placeholder=\"" D_WEB_ADMIN_PASSWORD "\" value=\"" D_ASTERISK_PWD "\"><br>"
|
||||
"<br>"
|
||||
"<label><input id='b1' type='checkbox'%s><b>" D_MQTT_ENABLE "</b></label><br>"
|
||||
"<br>"
|
||||
"<label><b>" D_DEVICE_NAME "</b> (%s)</label><br><input id='dn' placeholder='' value='%s'><br>"
|
||||
"<label><b>" D_DEVICE_NAME "</b> (%s)</label><br><input id='dn' placeholder=\"\" value=\"%s\"><br>"
|
||||
"<br>";
|
||||
|
||||
const char HTTP_FORM_END[] PROGMEM =
|
||||
|
@ -471,7 +471,7 @@ const char HTTP_FORM_UPG[] PROGMEM =
|
|||
"<div id='f1' style='display:block;'>"
|
||||
"<fieldset><legend><b> " D_UPGRADE_BY_WEBSERVER " </b></legend>"
|
||||
"<form method='get' action='u1'>"
|
||||
"<br><b>" D_OTA_URL "</b><br><input id='o' placeholder='OTA_URL' value='%s'><br>"
|
||||
"<br><b>" D_OTA_URL "</b><br><input id='o' placeholder=\"OTA_URL\" value=\"%s\"><br>"
|
||||
"<br><button type='submit'>" D_START_UPGRADE "</button></form>"
|
||||
"</fieldset><br><br>"
|
||||
"<fieldset><legend><b> " D_UPGRADE_BY_FILE_UPLOAD " </b></legend>";
|
||||
|
@ -2004,7 +2004,7 @@ void HandleOtherConfiguration(void)
|
|||
#endif // USE_SONOFF_IFAN
|
||||
for (uint32_t i = 0; i < maxfn; i++) {
|
||||
snprintf_P(stemp, sizeof(stemp), PSTR("%d"), i +1);
|
||||
WSContentSend_P(PSTR("<b>" D_FRIENDLY_NAME " %d</b> (" FRIENDLY_NAME "%s)<br><input id='a%d' placeholder='" FRIENDLY_NAME "%s' value='%s'><p></p>"),
|
||||
WSContentSend_P(PSTR("<b>" D_FRIENDLY_NAME " %d</b> (" FRIENDLY_NAME "%s)<br><input id='a%d' placeholder=\"" FRIENDLY_NAME "%s\" value=\"%s\"><p></p>"),
|
||||
i +1,
|
||||
(i) ? stemp : "",
|
||||
i,
|
||||
|
|
|
@ -1240,14 +1240,14 @@ const char HTTP_BTN_MENU_MQTT[] PROGMEM =
|
|||
const char HTTP_FORM_MQTT1[] PROGMEM =
|
||||
"<fieldset><legend><b> " D_MQTT_PARAMETERS " </b></legend>"
|
||||
"<form method='get' action='" WEB_HANDLE_MQTT "'>"
|
||||
"<p><b>" D_HOST "</b> (" MQTT_HOST ")<br><input id='mh' placeholder='" MQTT_HOST" ' value='%s'></p>"
|
||||
"<p><b>" D_HOST "</b> (" MQTT_HOST ")<br><input id='mh' placeholder=\"" MQTT_HOST "\" value=\"%s\"></p>"
|
||||
"<p><b>" D_PORT "</b> (" STR(MQTT_PORT) ")<br><input id='ml' placeholder='" STR(MQTT_PORT) "' value='%d'></p>"
|
||||
"<p><b>" D_CLIENT "</b> (%s)<br><input id='mc' placeholder='%s' value='%s'></p>";
|
||||
"<p><b>" D_CLIENT "</b> (%s)<br><input id='mc' placeholder=\"%s\" value=\"%s\"></p>";
|
||||
const char HTTP_FORM_MQTT2[] PROGMEM =
|
||||
"<p><b>" D_USER "</b> (" MQTT_USER ")<br><input id='mu' placeholder='" MQTT_USER "' value='%s'></p>"
|
||||
"<p><label><b>" D_PASSWORD "</b><input type='checkbox' onclick='sp(\"mp\")'></label><br><input id='mp' type='password' placeholder='" D_PASSWORD "' value='" D_ASTERISK_PWD "'></p>"
|
||||
"<p><b>" D_TOPIC "</b> = %%topic%% (%s)<br><input id='mt' placeholder='%s' value='%s'></p>"
|
||||
"<p><b>" D_FULL_TOPIC "</b> (%s)<br><input id='mf' placeholder='%s' value='%s'></p>";
|
||||
"<p><b>" D_USER "</b> (" MQTT_USER ")<br><input id='mu' placeholder=\"" MQTT_USER "\" value=\"%s\"></p>"
|
||||
"<p><label><b>" D_PASSWORD "</b><input type='checkbox' onclick='sp(\"mp\")'></label><br><input id='mp' type='password' placeholder=\"" D_PASSWORD "\" value=\"" D_ASTERISK_PWD "\"></p>"
|
||||
"<p><b>" D_TOPIC "</b> = %%topic%% (%s)<br><input id='mt' placeholder=\"%s\" value=\"%s\"></p>"
|
||||
"<p><b>" D_FULL_TOPIC "</b> (%s)<br><input id='mf' placeholder=\"%s\" value=\"%s\"></p>";
|
||||
|
||||
void HandleMqttConfiguration(void)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue