mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 00:55:52 +03:00
[GH-ISSUE #1370] WiFiManager drops consecutive spaces in SSID via configportal. #1172
Labels
No labels
📶 WiFi
🕸️ HTTP
Branch
DEV Help Wanted
Discussion
Documentation
ESP32
Example
Good First Issue
Hotfix
In Progress
Incomplete
Needs Feeback
Priority
QA
Question
Task
Upstream/Dependancy
bug
duplicate
enhancement
invalid
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/WiFiManager#1172
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @stevemisel on GitHub (Mar 9, 2022).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1370
Basic Infos
Hardware
WiFimanager Branch/Release: Master
Esp8266/Esp32: ESP32
Hardware: ESP-12e
Core Version: 2.4.0, staging
Description
WiFiManager drops spaces in SSID names; cannot connect to SSID with two spaces in the name. In this test case, I changed the SSID on a test router to "Lots of Spaces" [note double space, appears to be a single space here in github renders too!]. When running configportal, the SSID scan returns the proper name [see debug], but the additional space is missing ("Lots of Spaces") when viewing and selecting the SSID in the configportal UI.
Due to the SSID mismatch, WL_NO_SSID_AVAIL.
Adding the missing space manually in configportal resolves this. I have not debugged, but this smells like an HTML rendering issue.
Settings in IDE
Module: ESP32e
Additional libraries:
Sketch
Debug Messages
@tablatronix commented on GitHub (Mar 10, 2022):
@tablatronix commented on GitHub (Mar 11, 2022):
Ok so there are 2 ways to do this
I can either add some kind of decode on submit..
or
just not use html content as the parameter.
Right now we use js to copy the innerhtml into the form from the link
I think option 2 is the best as it will help avoid future issues as the ssid will be an escaped attribute and not html in the dom.
So I have added to the hrefs a
data-ssidattribute and change the js to look for that first.I added a new template var to account for this
{V}I was worried about this in the past and added an alternate ID parameter which is the wifiscan ID, but since I added async scanning I decided that data could change or if submitting an old session it would be bad if they were not synced up.
Also now using a data-attrib we can possibly change it to add bssid and other bits to encode base64 data etc..
I do not forsee any issues with this, let me know if anyone thinks of anything, if someone has custom html it should still fallback, I have not tested that though..