fix(admin): sanitize the richeditor read-only display with DOMPurify (T-10-16)
- displayHtml uses a dedicated DOMPurify 3.4.16 instance: EDITOR_TAGS, href only on <a> through isAllowedLink, DROPPED elements go with their content - string in, string out: parsed into DOMPurify's inert document, nothing adopted into the live document before binding - fails closed (empty string) unless isSupported and a fixed canary hold - Vitest browser mode in Playwright Chromium (npm run test:browser) covers the clobbering vectors, off-origin form, iframe, meta refresh, links and the inert parse; happy-dom keeps engine-independent assertions
This commit is contained in:
@@ -154,6 +154,7 @@ npm --prefix admin run dev # Vite dev server
|
||||
npm --prefix admin run build # type-check, then build into modules/boardwalk/dist
|
||||
npm --prefix admin run typecheck # vue-tsc only
|
||||
npm --prefix admin run test # Vitest
|
||||
npm --prefix admin run test:browser # Vitest browser mode in Playwright Chromium (needs the chromium build; npx --prefix admin playwright install chromium once)
|
||||
npm --prefix admin run gen:api # regenerate TypeScript types from admin/openapi/admin.json
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user