Closed ranma closed 4 weeks ago
maybe it would make even more sense to add string validation to addLiveViewInSection()
, rather than specifically as a workaround for bad manufacturer strings.
imho it makes sense to do the cleanup when we set the manufacturer string because it always makes sense to fix issues at the source of the problem and we should not pass around bad strings
I agree with Andreas. The new function is not indented properly. I am going to fix this now so this can be merged.
Thanks, @ranma :rocket:
If the string contains control characters for some reason, the browser will reject the json with the error
bad control character in string literal
.See https://github.com/helgeerbe/OpenDTU-OnBattery/discussions/1226#discussioncomment-10566898