https://oi.esphome.io/v2/www.js restAction method sends the text as is instead or urlencoding it.
restAction(r, t) {
fetch(`${Jt}/${r.domain}/${r.id}/${t}`, {
method: "POST",
body: "true"
}).then(e=>{
console.log(e)
}
)
}
### Additional information
My test scenario was to augment rtttl player byt ad-hoc strings.
Entering `Cat:d=16,o=6,b=95:32d,32d#,32d,32d#` only yields to `Cat:d=16,o=6,b=95:32d,32d`
Network console shows
http://192.168.0.54/text/template_text/set?value=Cat:d=16,o=6,b=95:32d,32d
Suggestion: apply urlencoding for the string being sent.
(Might be rather relevant for esphome-webserver)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
The problem
Using the web server interface to update the value of a text template sensor yields error when non-url friendly chars are entered.
Which version of ESPHome has the issue?
2023.11.0
What type of installation are you using?
Home Assistant Add-on
Which version of Home Assistant has the issue?
2023.11.2
What platform are you using?
ESP8266
Board
d1_mini
Component causing the issue
web_server
Example YAML snippet
Anything in the logs that might be useful for us?