File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -485,7 +485,7 @@ void WiFiManager::handleWifi(boolean scan) {
485
485
}
486
486
487
487
page += FPSTR (HTTP_FORM_START);
488
- char parLength[2 ];
488
+ char parLength[5 ];
489
489
// add the extra parameters to the form
490
490
for (int i = 0 ; i < _paramsCount; i++) {
491
491
if (_params[i] == NULL ) {
@@ -497,7 +497,7 @@ void WiFiManager::handleWifi(boolean scan) {
497
497
pitem.replace (" {i}" , _params[i]->getID ());
498
498
pitem.replace (" {n}" , _params[i]->getID ());
499
499
pitem.replace (" {p}" , _params[i]->getPlaceholder ());
500
- snprintf (parLength, 2 , " %d" , _params[i]->getValueLength ());
500
+ snprintf (parLength, 5 , " %d" , _params[i]->getValueLength ());
501
501
pitem.replace (" {l}" , parLength);
502
502
pitem.replace (" {v}" , _params[i]->getValue ());
503
503
pitem.replace (" {c}" , _params[i]->getCustomHTML ());
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ const char HTTP_HEAD_END[] PROGMEM = "</head><body><div style='text-align
29
29
const char HTTP_PORTAL_OPTIONS[] PROGMEM = " <form action=\" /wifi\" method=\" get\" ><button>Configure WiFi</button></form><br/><form action=\" /0wifi\" method=\" get\" ><button>Configure WiFi (No Scan)</button></form><br/><form action=\" /i\" method=\" get\" ><button>Info</button></form><br/><form action=\" /r\" method=\" post\" ><button>Reset</button></form>" ;
30
30
const char HTTP_ITEM[] PROGMEM = " <div><a href='#p' onclick='c(this)'>{v}</a> <span class='q {i}'>{r}%</span></div>" ;
31
31
const char HTTP_FORM_START[] PROGMEM = " <form method='get' action='wifisave'><input id='s' name='s' length=32 placeholder='SSID'><br/><input id='p' name='p' length=64 type='password' placeholder='password'><br/>" ;
32
- const char HTTP_FORM_PARAM[] PROGMEM = " <br/><input id='{i}' name='{n}' length ={l} placeholder='{p}' value='{v}' {c}>" ;
32
+ const char HTTP_FORM_PARAM[] PROGMEM = " <br/><input id='{i}' name='{n}' maxlength ={l} placeholder='{p}' value='{v}' {c}>" ;
33
33
const char HTTP_FORM_END[] PROGMEM = " <br/><button type='submit'>save</button></form>" ;
34
34
const char HTTP_SCAN_LINK[] PROGMEM = " <br/><div class=\" c\" ><a href=\" /wifi\" >Scan</a></div>" ;
35
35
const char HTTP_SAVED[] PROGMEM = " <div>Credentials Saved<br />Trying to connect ESP to network.<br />If it fails reconnect to AP to try again</div>" ;
You can’t perform that action at this time.
0 commit comments