Commit 3938954
refactor: remove static v-html sinks (#14583)
## Summary
Removes the three `v-html` sinks that render repository-owned static
markup:
- replaces the mask editor's HTML-string SVG map with a typed Vue icon
component
- renders the two pricing arrows as normal template text
- deletes the now-unused `iconsHtml` constant
## Security rationale
These values are currently hard-coded and therefore not directly
exploitable. Removing the raw HTML sinks still narrows the XSS attack
surface and prevents a future data-flow change from silently turning
them into unsafe DOM injection points.
## Verification
Local verification on commit `3354fdff0`:
- `pnpm test:unit src/components/maskeditor/ToolPanel.test.ts
src/platform/cloud/subscription/components/PricingTable.test.ts
src/platform/workspace/components/PricingTableWorkspace.test.ts` — 2
files passed, 22 tests passed
- `pnpm typecheck` — passed
- targeted ESLint, Stylelint, and `oxfmt --check` — passed
- scoped `rg` check finds no remaining `v-html` or `iconsHtml`
references in the changed code paths
The mask-editor test verifies every tool still renders its SVG icon.
## PR split / overlap check
This PR is intentionally limited to static application markup. It does
**not** modify node search.
Live file list for #14574:
- `packages/shared-frontend-utils/src/formatUtil.test.ts`
- `packages/shared-frontend-utils/src/formatUtil.ts`
- `src/components/searchbox/v2/NodeSearchListItem.test.ts`
Intersection with this PR: **none**.
Related: #14574
## Split series
- #14583 — static repository-owned markup
- #14584 — application rich-content boundary
- #14585 — website rich-text boundary
- #14574 — node-search escaping (owned by the existing PR; excluded
here)
Co-authored-by: ShihChi Huang <shh@theonlyperson.com>
Co-authored-by: Christian Byrne <cbyrne@comfy.org>1 parent 9d1a491 commit 3938954
4 files changed
Lines changed: 97 additions & 52 deletions
File tree
- src
- components/maskeditor
- extensions/core/maskeditor
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | 14 | | |
25 | 15 | | |
26 | 16 | | |
| |||
75 | 65 | | |
76 | 66 | | |
77 | 67 | | |
78 | | - | |
| 68 | + | |
79 | 69 | | |
80 | 70 | | |
81 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
| |||
43 | 42 | | |
44 | 43 | | |
45 | 44 | | |
| 45 | + | |
46 | 46 | | |
47 | | - | |
48 | 47 | | |
49 | 48 | | |
50 | 49 | | |
| |||
This file was deleted.
0 commit comments