-
-
Notifications
You must be signed in to change notification settings - Fork 442
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
HTML is always escaped for Telegram #203
Comments
Great find on your part; this is definitely a bug. I'll merge the new pull request (that will fix this) into the master as soon as all tests pass. By chance are you okay to just use the master branch for now in your environment (as a work around?) once things are merged? I just put out a brand new (Apprise) release a few days ago. I don't intend to put out another until I wrap up a few more fixes (should they come along) and/or new notification services. Thoughts? |
I use Docker with |
Actually, you might be able to cheat and still pull it off. However, if you blow away the docker container and re-create it this suggestion will be lost (and need to be repeated). But you should be able to: # get the container id first:
docker ps --filter=name=apprise
# in my case it was 1cdfa2136a27 - So now i can connect up to it:
docker exec -it 1cdfa2136a27 /bin/bash
# Now inside the container, install git:
apt-get update
apt-get install git -y
# Now update your copy of apprise using the master branch:
pip3 install --upgrade git+https://github.com/caronc/apprise@master I think that should work; it will still identify itself as v0.8.4, but you should receive all the perks recently pushed for Telegram. Let me know how it goes! |
Thanks for the idea, I ended up with forking and changing your Docker image. I'll use it until the official one is updated. |
Glad you figured it all out! 🙂 I'm going to close off this ticket now then. But if you do have any more issues, please don't hesitate to open up another! |
📣 Notification Service(s) Impacted
Telegram
🪲 Describe the bug
HTML is always escaped even if
format=html
is passed, so it's not possible send a notification with any HTML formatting. Currently I switched to Markdown as a workaround, but I'd have to escape a lot of symbols to make it work correctly. I think the data should be passed as-is if html format is specified.💡 Screenshots and Logs
![image](https://user-images.githubusercontent.com/910255/74055253-f2e74980-49df-11ea-9b45-d4032e954cab.png)
I have apprise-api in Docker with
APPRISE_STATELESS_URLS: tgram://${TELEGRAM_LOGGER_TOKEN}/${TELEGRAM_LOGGER_CHATID}/?format=html
and testing with
curl -X POST -d '{"body":"<b>not bold</b>"}' -H "Content-Type: application/json" http://localhost:8000/notify
Result:
🔮 Additional context
Looking at NotifyTelegram.py I think
should be changed to
but I'm not a python developer so I won't risk changing it myself :)
The text was updated successfully, but these errors were encountered: