mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-12-26 19:05:40 +00:00
ce18c948e6
handleEntities code uses simple modification offset which does not allow to detect whether the offset is placed before or after the element in already modified string. This works fine is most cases as Telegram server always sort the elements by offset, in ascending order. However, this is not the case when the modification, for example bold text, is applied to the URL. In this case, the offset of URL and bold entity is equal, which raises the issue. This commit introduces additional hack for this case, stripping any entities which intersect with URL. |
||
---|---|---|
.. | ||
handlers.go | ||
html.go | ||
telegram.go |