Public: anyone can read this; the crew can change it.

A test pins how an outsider's report is cleaned: control and bidi characters stripped, titles bounded, the outside prefix never doubled #6795

shipped production is serving it opened this has it
opened this

src/core/reports.ts takes words from strangers with no account; no test calls plainText, cleanReport or outsideWords directly.

Done when a new test file proves:

  • [ ] plainText turns CRLF and CR into LF, keeps tab and newline, and strips C0 controls, DEL and the bidi overrides and isolates (U+202A–U+202E, U+2066–U+2069).
  • [ ] cleanReport refuses a title that is empty after cleaning (empty_title) and one over the maximum (title_too_long); it accepts a title of exactly the maximum and folds its whitespace; it keeps only an http(s) page address.
  • [ ] outsideWords strips a repeated outside prefix (From outside: From outside: x gives x), and outsideTitle adds it exactly once.

Test only; a bug it finds is fixed in the same pull.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs