Centralize sanitization options constants #2745
Annotations
3 errors
|
CI (Test, pnpm test)
Process completed with exit code 1.
|
|
src/lib/services/contents/fields/file/process.test.js > Test processResource() > should sanitize credit with HTML tags:
src/lib/services/contents/fields/file/process.test.js#L417
AssertionError: expected "vi.fn()" to be called with arguments: [ …(2) ]
Received:
1st vi.fn() call:
@@ -1,10 +1,12 @@
[
"Photo by <a href=\"https://example.com\">Author</a> with <script>alert(\"xss\")</script>",
{
"ALLOWED_ATTR": [
"href",
+ "target",
+ "rel",
],
"ALLOWED_TAGS": [
"a",
],
},
Number of calls: 1
❯ src/lib/services/contents/fields/file/process.test.js:417:27
|
|
src/lib/services/contents/fields/file/process.test.js > Test processResource() > should process resource with URL:
src/lib/services/contents/fields/file/process.test.js#L115
AssertionError: expected "vi.fn()" to be called with arguments: [ 'Photo credit', …(1) ]
Received:
1st vi.fn() call:
@@ -1,10 +1,12 @@
[
"Photo credit",
{
"ALLOWED_ATTR": [
"href",
+ "target",
+ "rel",
],
"ALLOWED_TAGS": [
"a",
],
},
Number of calls: 1
❯ src/lib/services/contents/fields/file/process.test.js:115:27
|