mirror of
https://github.com/Seldaek/monolog.git
synced 2026-04-25 23:55:56 +03:00
[GH-ISSUE #1990] TelegramBotHandler: API returns error when truncating/splitting in HTML parse mode #853
Labels
No labels
Bug
Documentation
Feature
Needs Work
Support
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/monolog#853
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @MacDada on GitHub (Sep 19, 2025).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/1990
Monolog 3.9
I set
$parseModeto'HTML'and keep the default$splitLongMessagesasfalse.When the message is looooong, it gets truncated. If the truncation happens inside HTML tag,
the Telegram API returns error 400:
In my example the loooong string has
<code>blah blah</code>. Lets say it gets truncated at firstblah, then the</code>is gone and API complains.EDIT: actually, with
$splitLongMessages=truesame kind of problem – the message splits inside HTML causing Telegram API error(s).@akilesh1706 commented on GitHub (Oct 5, 2025):
@MacDada I can work on this issue. Can I get it assigned as part of Hacktober fest 2025?
@MacDada commented on GitHub (Oct 5, 2025):
Yeah, well… why not… we can compare results as I've actually got splitting (almost) done :D
@Seldaek commented on GitHub (Dec 30, 2025):
PR welcome ;)