Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

An HTML-only inbound email reaches its trigger with HTML character references left in the text

未关闭
#806 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@RaphaelFakhri 已经在做这个了。

开始于 2026年10月18日。

  • #807 来自 @RaphaelFakhri —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
停滞
技术栈
typescript
领域
backend

调研方向

Start in server/src/responsibilities/email.ts at extractEmailText and trace the HTML branch that strips tags and collapses whitespace. Reproduce with the HTML-only sample in the issue, then check whether the extracted text decodes its character references to match the expected output. Issue #807 is already an open linked pull request.

由索引模型根据 Issue 内容生成。

描述

An email trigger (SES -> SNS -> /sns) reads an HTML-only mail through extractEmailText in server/src/responsibilities/email.ts. The HTML branch strips <style>, <script> and every tag, then collapses whitespace. It never decodes character references, so the payload text the Bot receives keeps them as written.

A mail whose only part is:

Content-Type: text/html; charset=utf-8

<p>Q3&nbsp;numbers for AT&amp;T: margin &lt; 5%, we&#8217;re &quot;on&nbsp;track&quot;</p>

reaches the Bot as:

Q3&nbsp;numbers for AT&amp;T: margin &lt; 5%, we&#8217;re &quot;on&nbsp;track&quot;

Expected

Q3 numbers for AT&T: margin < 5%, we’re "on track"

Outlook and most HTML editors write &nbsp;, &amp; and numeric references such as &#8217; throughout a message, so an HTML-only mail is read, quoted and summarised with these sequences in it.

Reproduce

import { extractEmailText } from "./server/src/responsibilities/email";
extractEmailText("Content-Type: text/html\r\n\r\n<p>AT&amp;T&nbsp;ok</p>");
// "AT&amp;T&nbsp;ok"

Found on main at 12c3a69.

主要语言
TypeScript
星标
6.6k
派生
914
平均合并
19 小时 22 分钟
30 天内合并 PR
140

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

CopilotKit/OpenBot 的其他 Issue

查看 CopilotKit/OpenBot 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。