Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#806 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@RaphaelFakhri ci sta già lavorando.

Dal 18/10/2026.

  • #807 di @RaphaelFakhri — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
typescript
Ambito
backend

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
TypeScript
Stelle
6.6k
Fork
914
Merge medio
19h 22m
PR unite (30g)
140

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di CopilotKit/OpenBot

Tutte le issue di CopilotKit/OpenBot

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.