Skip to content

fix(messaging): rewrite bare < so WeChat does not swallow the line - #258

Open
DSeaStar wants to merge 1 commit into
Tencent:mainfrom
DSeaStar:fix/escape-bare-lt-wechat-markdown
Open

DSeaStar wants to merge 1 commit into
Tencent:mainfrom
DSeaStar:fix/escape-bare-lt-wechat-markdown

Conversation

@DSeaStar

Copy link
Copy Markdown

Fixes #245. WeChat treats any < as an HTML tag start, so comparisons like <80% hide the rest of the line and break bold. HTML entities display literally, so non-tag < is rewritten to full-width U+FF1C. Real tags (

, ) and code-fence content are unchanged. 146 markdown-filter tests pass, including the issue reproductions and streaming hold-back for a split <.

WeChat treats any < as an HTML tag start, even in comparisons like <80%.
That hides the rest of the line and breaks **bold** on the same line.
HTML entities are shown literally, so replace non-tag < with full-width U+FF1C.
Real tags (<div>, </span>) and code-fence content are left unchanged.

Fixes Tencent#245
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] StreamingMarkdownFilter does not escape bare "<", causing WeChat to swallow the rest of the line and break **bold**

1 participant