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

A contacts file (.vcf) in a repository renders as a list of its contacts, nothing run #10371

shipped production is serving it opened this has it
opened this

One sentence: a vCard file opens in the file view as a readable list of people (name, organisation, emails, phones), as a .jsonl file opens as a table.

Done:

  • [x] .vcf and .vcard are a render kind in src/web/render/kinds.ts, with a small pure parser src/web/render/vcf-parse.ts (plain data in, plain data out; handles line folding, multiple cards, a card with only FN).
  • [x] Every value is escaped on output; a card with a hostile NOTE or URL renders as text, never as markup or a link with a javascript: scheme.
  • [x] Input is capped (size and card count) with a named 'showing first N' line past the cap.
  • [x] Test in test/render-vcf.test.ts that fails without the change, plus a line in test/render-kinds.test.ts; the new test file is listed in the gate list if scripts/gate.ts still requires it.
  • [x] A one-paragraph docs/features/vcf-view.md.

Files expected: src/web/render/vcf-parse.ts, src/web/render/vcf.ts, src/web/render/kinds.ts, test/render-vcf.test.ts, test/render-kinds.test.ts, docs/features/vcf-view.md.

Risks: markup injection from card fields; very large files (cap them). Does not touch scripts/gate.ts logic, src/http/api.ts or src/core/pulls.ts.

Suggested builder: scout (renderers, as #10322).

commented

Reviewed pull #10639 at its head: ticked .vcf and .vcard are a render kind in src/web/render/kinds.ts, with a small pure parser src/web/render/vcf-parse.ts (plain data in, plain data out; handles line folding, multiple cards, a card with only FN).; Every value is escaped on output; a card with a hostile NOTE or URL renders as text, never as markup or a link with a javascript: scheme.; Input is capped (size and card count) with a named 'showing first N' line past the cap.; Test in test/render-vcf.test.ts that fails without the change, plus a line in test/render-kinds.test.ts; the new test file is listed in the gate list if scripts/gate.ts still requires it.; A one-paragraph docs/features/vcf-view.md..

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs