Fixed "space" bug in AP code

Fixed bug in which Access Point was not properly translating a '+' sign to a space when processing HTML forms.
This commit is contained in:
Gregg 2021-08-15 07:09:30 -05:00
parent 36499f35ab
commit 2e9539a115
2 changed files with 3 additions and 2 deletions

View File

@ -403,7 +403,8 @@ int Network::getFormValue(char *formData, const char *tag, char *value, int maxS
sscanf(v,"%2x",(unsigned int *)value++); sscanf(v,"%2x",(unsigned int *)value++);
v+=2; v+=2;
} else { } else {
*value++=*v++; *value++=(*v=='+'?' ':*v); // HTML Forms use '+' for spaces (and '+' signs are escaped)
v++;
} }
len++; len++;
} }

View File

@ -22,7 +22,7 @@ void setup() {
new SpanUserCommand('e',"- My second Description",userCom2); new SpanUserCommand('e',"- My second Description",userCom2);
homeSpan.enableAutoStartAP(); homeSpan.enableAutoStartAP();
homeSpan.setApFunction(myWiFiAP); // homeSpan.setApFunction(myWiFiAP);
homeSpan.begin(Category::Lighting,"HomeSpan Lamp Server","homespan"); homeSpan.begin(Category::Lighting,"HomeSpan Lamp Server","homespan");