-
Notifications
You must be signed in to change notification settings - Fork 3
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
Sanitize markdown before sending if the adapter is hubot-telegram #3
Comments
The text produced in the shell adapter, which appears to cause the problem, is this:
|
The issue is the mismatched underscore in the description. The telegram bot API refuses the message because it has a mismatched markdown element. reproduce with: curl -XPOST -H 'content-type: application/json' https://api.telegram.org/$TELEGRAM_TOKEN/sendMessage -d @/tmp/test.json contents of /tmp/test.json should be {
"chat_id": 344335405,
"text": "This unmatched_underscore breaks telegram markdown parsing",
"reply_to_message_id": 8,
"parse_mode": "Markdown"
} |
If Telegram doesn't change their API I'm going to have to add some kind of sanitizer to escape the descriptions and commands before sending them to the telegram adapter. |
hubot help
doesn't work with the Telegram adapter and a JS file containing this help header:Running
hubot help
produces this errorThe text was updated successfully, but these errors were encountered: