fix: 修复 /s 筛选按钮无响应及翻页标题消失 bug#9
Merged
Merged
Conversation
根因:上次为 edit_text 添加 parse_mode="Markdown" 后, 云盘 URL 中的 _ 字符被 Telegram 解析为 Markdown 斜体标记, API 返回 can't parse entities 错误,被 except 静默吞掉, 导致点击筛选/翻页按钮后消息不更新。 修复1:新增 _md_escape() 函数,对 URL 中的 Markdown 特殊字符 (_、*、[、`)进行转义,确保动态 URL 内容不破坏 Markdown 解析。 修复2:翻页(search_next/previous_page)后改用 get_text_with_info() 获取文本,避免翻页后标题行消失。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
根因:上次为 edit_text 添加 parse_mode="Markdown" 后,
云盘 URL 中的 _ 字符被 Telegram 解析为 Markdown 斜体标记,
API 返回 can't parse entities 错误,被 except 静默吞掉,
导致点击筛选/翻页按钮后消息不更新。
修复1:新增 md_escape() 函数,对 URL 中的 Markdown 特殊字符
(、*、[、`)进行转义,确保动态 URL 内容不破坏 Markdown 解析。
修复2:翻页(search_next/previous_page)后改用
get_text_with_info() 获取文本,避免翻页后标题行消失。