Skip to content

Commit 1e52207

Browse files
committed
doc: updated README with latest info on legacy browser tests
1 parent 278c5ff commit 1e52207

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ DOMPurify runs as JavaScript and works in all modern browsers (Safari (10+), Ope
1212

1313
**Note that [DOMPurify v2.5.9](https://github.com/cure53/DOMPurify/releases/tag/2.5.9) is the latest version supporting MSIE. For important security updates compatible with MSIE, please use the [2.x branch](https://github.com/cure53/DOMPurify/tree/2.x).**
1414

15-
Our automated tests cover 9 browser/OS combinations (Chromium, Firefox, and WebKit across Ubuntu, macOS, and Windows) on every push, plus Node.js v20, v22, v24, v25 and v26 running DOMPurify on [jsdom](https://github.com/jsdom/jsdom). Older Node versions are known to work as well, but hey... no guarantees.
15+
Our automated tests cover 9 browser/OS combinations on the current engines (Chromium, Firefox, and WebKit across Ubuntu, macOS, and Windows) on every push, and a separate matrix re-runs the suite on older engine snapshots (back to roughly Chromium 110, Firefox 108 and WebKit 16.4, around three years old) so regressions on outdated browsers get caught too. We also run Node.js v20, v22, v24, v25 and v26 with DOMPurify on [jsdom](https://github.com/jsdom/jsdom). Older Node versions are known to work as well, but hey... no guarantees.
1616

1717
DOMPurify is written by security people who have vast background in web attacks and XSS. Fear not. For more details please also read about our [Security Goals & Threat Model](https://github.com/cure53/DOMPurify/wiki/Security-Goals-&-Threat-Model). Please, read it. Like, really. And if you enjoy the gory details, the [Attack Classes & Bypass History](https://github.com/cure53/DOMPurify/wiki/Attack-Classes-&-Bypass-History) page catalogs the parser-mutation, namespace, clobbering, and template tricks DOMPurify defends against.
1818

@@ -61,9 +61,7 @@ const clean = DOMPurify.sanitize(dirty, { USE_PROFILES: { html: true } });
6161

6262
### Is there any foot-gun potential?
6363

64-
Well, please note, if you _first_ sanitize HTML and then modify it _afterwards_, you might easily **void the effects of sanitization**. If you feed the sanitized markup to another library _after_ sanitization, please be certain that the library doesn't mess around with the HTML on its own.
65-
66-
See the [Security Goals & Threat Model](https://github.com/cure53/DOMPurify/wiki/Security-Goals-&-Threat-Model) for safe-usage recipes and the tags/attributes worth thinking twice about, and [Attack Classes & Bypass History](https://github.com/cure53/DOMPurify/wiki/Attack-Classes-&-Bypass-History) for why post-processing and changing the markup context defeat sanitization.
64+
Well, please note, if you _first_ sanitize HTML and then modify it _afterwards_, you might easily **void the effects of sanitization**. If you feed the sanitized markup to another library _after_ sanitization, please be certain that the library doesn't mess around with the HTML on its own. See the [Security Goals & Threat Model](https://github.com/cure53/DOMPurify/wiki/Security-Goals-&-Threat-Model) for safe-usage recipes and the tags/attributes worth thinking twice about, and [Attack Classes & Bypass History](https://github.com/cure53/DOMPurify/wiki/Attack-Classes-&-Bypass-History) for why post-processing and changing the markup context defeat sanitization.
6765

6866
### Okay, makes sense, let's move on
6967

@@ -486,7 +484,7 @@ DOMPurify.addHook(
486484
487485
## Continuous Integration
488486
489-
We are currently using GitHub Actions in combination with Playwright. This gives us the possibility to confirm for each and every commit that all is going according to plan in relevant modern browsers. Check out the build logs here: https://github.com/cure53/DOMPurify/actions
487+
We are currently using GitHub Actions in combination with Playwright. This lets us confirm on every commit that everything works in the relevant modern browsers, and a separate scheduled and on-merge workflow re-runs the suite on older engine snapshots so breakage on outdated browsers is caught too. Check out the build logs here: https://github.com/cure53/DOMPurify/actions
490488
491489
You can further run local tests by executing `npm run test`.
492490
@@ -505,10 +503,11 @@ We use ESLint via `xo` as part of our pre-commit workflow to help ensure code co
505503
These are our npm scripts:
506504
507505
- `npm run dev` to build the unminified UMD bundle while watching sources for changes
508-
- `npm run test` to lint the sources, run tests through jsdom, and run Karma tests in Chrome
506+
- `npm run test` to lint the sources, run tests through jsdom, and run browser tests in Chromium via Playwright
509507
- `npm run test:jsdom` to only run tests through jsdom
510508
- `npm run test:browser` to only run tests through Playwright
511-
- `npm run test:ci` to run the CI test flow for jsdom and Karma/BrowserStack
509+
- `npm run test:browser:legacy` to run the suite on older browser engines (point `PW_MODULE` at a pinned old Playwright install; see `.github/workflows/legacy-browsers.yml`)
510+
- `npm run test:ci` to run the CI test flow for jsdom and Playwright
512511
- `npm run test:fuzz` to run a small fuzzer covering `sanitize()` and CONFIG
513512
- `npm run lint` to lint the sources using ESLint via xo
514513
- `npm run format` to format JavaScript/TypeScript and Markdown sources with Prettier

0 commit comments

Comments
 (0)