Bob 4394c23b66
fix(channels): decode Slack entity escapes in inbound message text (#6045)
* fix(channels): decode Slack entity escapes in inbound message text

Slack sends a user-typed &, < and > as &amp;, &lt; and &gt; in event text, so raw <...> always marks a control sequence. The Slack channel passed that text to the agent as-is, so code, comparisons and names like R&D reached the agent as 'a &lt; b', 'R&amp;D'. Decode the three entities after bot-mention stripping (amp last, so an escaped entity is decoded once) and keep mentions and links untouched.

* test(channels): cover Slack entities inside link labels

Signed-off-by: Willem Jiang <willem.jiang@gmail.com>

---------

Signed-off-by: Willem Jiang <willem.jiang@gmail.com>
Co-authored-by: Willem Jiang <willem.jiang@gmail.com>
2026-09-30 09:38:05 +08:00
..