Sanitizer API

Open
#87 0 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
javascript, node.js

Research direction

Start by reading the linked Sanitizer API WICG proposal, then compare its DOM-coupled design with the server-side use cases described here, including DOMPurify, jsdom, and happy-dom. Done means documenting whether WinterTC should provide input on string-to-string sanitization or pursue a limited DOM subset, with the scope and trade-offs made explicit.

Written by the indexing model from the issue text.

Description

The web Sanitizer API is still in flux. But maybe it’s worth considering whether it’s within scope of WinterTC early on.

  • Server-side rendering (SSR) is becoming increasingly common.
  • DOMPurify is widely deployed on Node and probably other JavaScript server runtimes.

Of course, the Sanitizer API is strongly coupled to DOM node objects; its current design extends Element and Document.

  • But, while the spec is still in flux, it may be worth investigating whether WinterTC should provide input to the Sanitizer API WICG on any string-to-string transformations. Such a string-to-string sanitization API may still be useful in webpages and would definitely be useful in JavaScript server runtimes (or service workers in browsers).
  • Alternatively, a very limited subset of the DOM could also be standardized by WinterTC, à la jsdom and happy-dom, and the Santizer API for servers would sit on that DOM subset. This would be a much bigger undertaking, but it could pay off.
Dominant language
Bikeshed
Stars
308
Forks
17
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from WinterTC55/proposal-minimum-common-api

All issues in WinterTC55/proposal-minimum-common-api

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.