Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"%" sign not supported (and probably other URL special chars) #14

Open
Robotto opened this issue Jun 30, 2021 · 1 comment
Open

"%" sign not supported (and probably other URL special chars) #14

Robotto opened this issue Jun 30, 2021 · 1 comment

Comments

@Robotto
Copy link

Robotto commented Jun 30, 2021

The String concatenation used here

String post = String("token=")+_token+"&user="+_user+"&title="+_title+"&message="+_message+"&device="+_device+"&url="+_url+"&url_title="+_url_title+"&priority="+_priority+"&retry="+_retry+"&expire="+_expire+"&sound="+_sound;

Does not escape special chars... The best fix is probably to just notify the user in the README rather than implement a parser...

@Robotto
Copy link
Author

Robotto commented Jun 30, 2021

Doesn't Work:
po.setMessage("BATT @" + String(percentage) + "% (" + String(voltage) + "V)"); //Doesn't work

Works:
po.setMessage("BATT @" + String(percentage) + "%25 (" + String(voltage) + "V)"); //%25 is % in URL encode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant