-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[telegram] Can't send message with underscore character #11691
Labels
bug
An unexpected problem or unintended behavior of an add-on
Comments
clinique
added a commit
to clinique/openhab-addons
that referenced
this issue
Nov 21, 2022
Signed-off-by: clinique <gael@lhopital.org>
clinique
added a commit
to clinique/openhab-addons
that referenced
this issue
Nov 21, 2022
Signed-off-by: clinique <gael@lhopital.org>
clinique
added a commit
to clinique/openhab-addons
that referenced
this issue
Nov 21, 2022
Signed-off-by: clinique <gael@lhopital.org>
lolodomo
pushed a commit
that referenced
this issue
Nov 21, 2022
Closed by #13758 |
andrasU
pushed a commit
to andrasU/openhab-addons
that referenced
this issue
Dec 24, 2022
Signed-off-by: clinique <gael@lhopital.org> Signed-off-by: Andras Uhrin <andras.uhrin@gmail.com>
borazslo
pushed a commit
to borazslo/openhab-mideaac-addon
that referenced
this issue
Jan 8, 2023
Signed-off-by: clinique <gael@lhopital.org>
psmedley
pushed a commit
to psmedley/openhab-addons
that referenced
this issue
Feb 23, 2023
Signed-off-by: clinique <gael@lhopital.org>
nemerdaud
pushed a commit
to nemerdaud/openhab-addons
that referenced
this issue
Feb 28, 2023
Signed-off-by: clinique <gael@lhopital.org>
andrasU
pushed a commit
to andrasU/openhab-addons
that referenced
this issue
Jan 6, 2024
Signed-off-by: clinique <gael@lhopital.org> Signed-off-by: Andras Uhrin <andras.uhrin@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I noticed when trying to set up a rule to send telegram messages when my zwave devices drop offline, I was getting the error "Failed to send telegram message: Bad Request: can't parse entities: Can't find end of the entity starting at byte offset 182". I narrowed it down by counting the characters and then attempting to send a message with just an _ in it, which resulted in "Failed to send telegram message: Bad Request: can't parse entities: Can't find end of the entity starting at byte offset 0"
Expected Behavior
The message should send without issue
Current Behavior
Attempting to send a message with a _ (underscore) character gives the message "Failed to send telegram message: Bad Request: can't parse entities: Can't find end of the entity starting at byte offset ". Appears to happen with the sendTelegram, sendTelegramQuery, and sendTelegramQuery actions
Possible Solution
Internally escape the character before sending if it's an invalid character on the telegram API
Steps to Reproduce (for Bugs)
This python script:
will produce these lines in the log:
Context
I first noticed while trying to send a log snippet to my telegram with the text "COMMUNICATION_ERROR" in it but was failing with the above errors. I am able to work around that by replacing the underscore with a space but it would be good to not have to do that.
Your Environment
The text was updated successfully, but these errors were encountered: