From db3ca18f6942ab23a138e21d77b092a103b9c5ea Mon Sep 17 00:00:00 2001 From: Jan Kowalleck Date: Thu, 24 Oct 2024 11:37:42 +0200 Subject: [PATCH 1/6] fix: iri-escape double-quot Signed-off-by: Jan Kowalleck --- HISTORY.md | 4 ++++ examples/node/javascript/example.cjs | 1 + src/_helpers/uri.ts | 11 ++++++----- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index c0b96e6e2..67cd4d7fb 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -6,6 +6,8 @@ All notable changes to this project will be documented in this file. +* Fixed + * url-encode double-quote in urls. ([#1154] via [#]) * Build * Use _TypeScript_ `v5.6.2` now, was `v5.5.3` (via [#1130]. [#1144]) * Use _webpack_ `v5.95.0` now, was `v5.93.0` (via [#1138], [#1147]) @@ -14,6 +16,8 @@ All notable changes to this project will be documented in this file. [#1138]: https://github.com/CycloneDX/cyclonedx-javascript-library/pull/1138 [#1144]: https://github.com/CycloneDX/cyclonedx-javascript-library/pull/1144 [#1147]: https://github.com/CycloneDX/cyclonedx-javascript-library/pull/1147 +[#1154]: https://github.com/CycloneDX/cyclonedx-javascript-library/issues/1154 +[#]: ## 6.11.0 -- 2024-07-15 diff --git a/examples/node/javascript/example.cjs b/examples/node/javascript/example.cjs index 8995a57a7..2d32649cb 100644 --- a/examples/node/javascript/example.cjs +++ b/examples/node/javascript/example.cjs @@ -31,6 +31,7 @@ bom.metadata.component = new CDX.Models.Component( 'MyProject' ) bom.metadata.component.licenses.add(lFac.makeFromString('MIT OR Apache-2.0')) +bom.metadata.component. const componentA = new CDX.Models.Component( CDX.Enums.ComponentType.Library, diff --git a/src/_helpers/uri.ts b/src/_helpers/uri.ts index 5b5c56ad0..c9908f440 100644 --- a/src/_helpers/uri.ts +++ b/src/_helpers/uri.ts @@ -24,7 +24,8 @@ const _ESCAPES: Array<[RegExp, string]> = [ [//g, '%3E'], [/\{/g, '%7B'], - [/}/g, '%7D'] + [/}/g, '%7D'], + [/"/, '%%22'] ] /** @@ -34,10 +35,10 @@ const _ESCAPES: Array<[RegExp, string]> = [ * * BEST EFFORT IMPLEMENTATION * - * @see http://www.w3.org/TR/xmlschema-2/#anyURI - * @see http://www.datypic.com/sc/xsd/t-xsd_anyURI.html - * @see https://datatracker.ietf.org/doc/html/rfc2396 - * @see https://datatracker.ietf.org/doc/html/rfc3987 + * @see {@kink http://www.w3.org/TR/xmlschema-2/#anyURI} + * @see {@kink http://www.datypic.com/sc/xsd/t-xsd_anyURI.html} + * @see {@kink https://datatracker.ietf.org/doc/html/rfc2396} + * @see {@kink https://datatracker.ietf.org/doc/html/rfc3987} */ export function escapeUri (value: T): T { if (value === undefined) { From 59e70de0c2ad99da5aab6552c49f95c5a57121f5 Mon Sep 17 00:00:00 2001 From: Jan Kowalleck Date: Thu, 24 Oct 2024 11:40:39 +0200 Subject: [PATCH 2/6] history Signed-off-by: Jan Kowalleck --- HISTORY.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 67cd4d7fb..66b46f334 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -7,7 +7,7 @@ All notable changes to this project will be documented in this file. * Fixed - * url-encode double-quote in urls. ([#1154] via [#]) + * url-encode double-quote in urls. ([#1154] via [#1155]) * Build * Use _TypeScript_ `v5.6.2` now, was `v5.5.3` (via [#1130]. [#1144]) * Use _webpack_ `v5.95.0` now, was `v5.93.0` (via [#1138], [#1147]) @@ -17,7 +17,7 @@ All notable changes to this project will be documented in this file. [#1144]: https://github.com/CycloneDX/cyclonedx-javascript-library/pull/1144 [#1147]: https://github.com/CycloneDX/cyclonedx-javascript-library/pull/1147 [#1154]: https://github.com/CycloneDX/cyclonedx-javascript-library/issues/1154 -[#]: +[#1155]: https://github.com/CycloneDX/cyclonedx-javascript-library/pull/1155 ## 6.11.0 -- 2024-07-15 From 7b442c18c9b870ec4dbe312940d18059dc73bdc9 Mon Sep 17 00:00:00 2001 From: Jan Kowalleck Date: Thu, 24 Oct 2024 11:41:23 +0200 Subject: [PATCH 3/6] history Signed-off-by: Jan Kowalleck --- HISTORY.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index 66b46f334..8d0480ed6 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -7,7 +7,7 @@ All notable changes to this project will be documented in this file. * Fixed - * url-encode double-quote in urls. ([#1154] via [#1155]) + * Encode double-quote in URLs. ([#1154] via [#1155]) * Build * Use _TypeScript_ `v5.6.2` now, was `v5.5.3` (via [#1130]. [#1144]) * Use _webpack_ `v5.95.0` now, was `v5.93.0` (via [#1138], [#1147]) From 6302756caa2f2017a8f350e14d84b3837ffd1b3c Mon Sep 17 00:00:00 2001 From: Jan Kowalleck Date: Thu, 24 Oct 2024 12:18:28 +0200 Subject: [PATCH 4/6] fix Signed-off-by: Jan Kowalleck --- examples/node/javascript/example.cjs | 1 - src/_helpers/uri.ts | 10 +++++----- tests/_data/models.js | 1 + .../json_sortedLists_spec1.2.json | 5 +++++ .../json_sortedLists_spec1.3.json | 5 +++++ .../json_sortedLists_spec1.4.json | 5 +++++ .../json_sortedLists_spec1.5.json | 5 +++++ .../json_sortedLists_spec1.6.json | 5 +++++ .../xml_sortedLists_spec1.2.json | 19 +++++++++++++++++++ .../xml_sortedLists_spec1.3.json | 19 +++++++++++++++++++ .../xml_sortedLists_spec1.4.json | 19 +++++++++++++++++++ .../xml_sortedLists_spec1.5.json | 19 +++++++++++++++++++ .../xml_sortedLists_spec1.6.json | 19 +++++++++++++++++++ .../json_complex_spec1.2.json.bin | 5 +++++ .../json_complex_spec1.3.json.bin | 5 +++++ .../json_complex_spec1.4.json.bin | 5 +++++ .../json_complex_spec1.5.json.bin | 5 +++++ .../json_complex_spec1.6.json.bin | 5 +++++ .../xml_complex_spec1.2.xml.bin | 4 ++++ .../xml_complex_spec1.3.xml.bin | 4 ++++ .../xml_complex_spec1.4.xml.bin | 4 ++++ .../xml_complex_spec1.5.xml.bin | 4 ++++ .../xml_complex_spec1.6.xml.bin | 4 ++++ 23 files changed, 171 insertions(+), 6 deletions(-) diff --git a/examples/node/javascript/example.cjs b/examples/node/javascript/example.cjs index 2d32649cb..8995a57a7 100644 --- a/examples/node/javascript/example.cjs +++ b/examples/node/javascript/example.cjs @@ -31,7 +31,6 @@ bom.metadata.component = new CDX.Models.Component( 'MyProject' ) bom.metadata.component.licenses.add(lFac.makeFromString('MIT OR Apache-2.0')) -bom.metadata.component. const componentA = new CDX.Models.Component( CDX.Enums.ComponentType.Library, diff --git a/src/_helpers/uri.ts b/src/_helpers/uri.ts index c9908f440..1af74bddb 100644 --- a/src/_helpers/uri.ts +++ b/src/_helpers/uri.ts @@ -19,13 +19,13 @@ Copyright (c) OWASP Foundation. All Rights Reserved. const _ESCAPES: Array<[RegExp, string]> = [ [/ /g, '%20'], + [/"/g, '%22'], [/\[/g, '%5B'], [/]/g, '%5D'], [//g, '%3E'], [/\{/g, '%7B'], [/}/g, '%7D'], - [/"/, '%%22'] ] /** @@ -35,10 +35,10 @@ const _ESCAPES: Array<[RegExp, string]> = [ * * BEST EFFORT IMPLEMENTATION * - * @see {@kink http://www.w3.org/TR/xmlschema-2/#anyURI} - * @see {@kink http://www.datypic.com/sc/xsd/t-xsd_anyURI.html} - * @see {@kink https://datatracker.ietf.org/doc/html/rfc2396} - * @see {@kink https://datatracker.ietf.org/doc/html/rfc3987} + * @see {@link http://www.w3.org/TR/xmlschema-2/#anyURI} + * @see {@link http://www.datypic.com/sc/xsd/t-xsd_anyURI.html} + * @see {@link https://datatracker.ietf.org/doc/html/rfc2396} + * @see {@link https://datatracker.ietf.org/doc/html/rfc3987} */ export function escapeUri (value: T): T { if (value === undefined) { diff --git a/tests/_data/models.js b/tests/_data/models.js index d19322e72..affd82ea2 100644 --- a/tests/_data/models.js +++ b/tests/_data/models.js @@ -284,6 +284,7 @@ module.exports.createComplexStructure = function () { ['encode anyUri: mailto', 'mailto:info@example.org'], ['encode anyUri: relative path', '../foo/bar'], ['encode anyUri: space', 'https://example.org/foo bar bazz%20again+again'], + ['encode anyUri: "', 'https://example.org/"test"'], ['encode anyUri: []', 'https://example.org/?bar[test]=baz[again]'], ['encode anyUri: <>', 'https://example.org/#'], ['encode anyUri: {}', 'https://example.org/#{test}{again}'], diff --git a/tests/_data/normalizeResults/json_sortedLists_spec1.2.json b/tests/_data/normalizeResults/json_sortedLists_spec1.2.json index 6a44367a2..fe6a54503 100644 --- a/tests/_data/normalizeResults/json_sortedLists_spec1.2.json +++ b/tests/_data/normalizeResults/json_sortedLists_spec1.2.json @@ -145,6 +145,11 @@ "type": "other", "comment": "encode anyUri: partially encoded" }, + { + "url": "https://example.org/%22test%22", + "type": "other", + "comment": "encode anyUri: \"" + }, { "url": "https://example.org/#%7Btest%7D%7Bagain%7D", "type": "other", diff --git a/tests/_data/normalizeResults/json_sortedLists_spec1.3.json b/tests/_data/normalizeResults/json_sortedLists_spec1.3.json index 388254ee9..b0e10418b 100644 --- a/tests/_data/normalizeResults/json_sortedLists_spec1.3.json +++ b/tests/_data/normalizeResults/json_sortedLists_spec1.3.json @@ -167,6 +167,11 @@ "type": "other", "comment": "encode anyUri: partially encoded" }, + { + "url": "https://example.org/%22test%22", + "type": "other", + "comment": "encode anyUri: \"" + }, { "url": "https://example.org/#%7Btest%7D%7Bagain%7D", "type": "other", diff --git a/tests/_data/normalizeResults/json_sortedLists_spec1.4.json b/tests/_data/normalizeResults/json_sortedLists_spec1.4.json index 354fa4cdb..df72c2358 100644 --- a/tests/_data/normalizeResults/json_sortedLists_spec1.4.json +++ b/tests/_data/normalizeResults/json_sortedLists_spec1.4.json @@ -169,6 +169,11 @@ "type": "other", "comment": "encode anyUri: partially encoded" }, + { + "url": "https://example.org/%22test%22", + "type": "other", + "comment": "encode anyUri: \"" + }, { "url": "https://example.org/#%7Btest%7D%7Bagain%7D", "type": "other", diff --git a/tests/_data/normalizeResults/json_sortedLists_spec1.5.json b/tests/_data/normalizeResults/json_sortedLists_spec1.5.json index 37d4d26fc..da1a2f1c2 100644 --- a/tests/_data/normalizeResults/json_sortedLists_spec1.5.json +++ b/tests/_data/normalizeResults/json_sortedLists_spec1.5.json @@ -178,6 +178,11 @@ "type": "other", "comment": "encode anyUri: partially encoded" }, + { + "url": "https://example.org/%22test%22", + "type": "other", + "comment": "encode anyUri: \"" + }, { "url": "https://example.org/#%7Btest%7D%7Bagain%7D", "type": "other", diff --git a/tests/_data/normalizeResults/json_sortedLists_spec1.6.json b/tests/_data/normalizeResults/json_sortedLists_spec1.6.json index 2fdeb6c25..b1bd976a3 100644 --- a/tests/_data/normalizeResults/json_sortedLists_spec1.6.json +++ b/tests/_data/normalizeResults/json_sortedLists_spec1.6.json @@ -178,6 +178,11 @@ "type": "other", "comment": "encode anyUri: partially encoded" }, + { + "url": "https://example.org/%22test%22", + "type": "other", + "comment": "encode anyUri: \"" + }, { "url": "https://example.org/#%7Btest%7D%7Bagain%7D", "type": "other", diff --git a/tests/_data/normalizeResults/xml_sortedLists_spec1.2.json b/tests/_data/normalizeResults/xml_sortedLists_spec1.2.json index 58c6dbbe1..c37599d9b 100644 --- a/tests/_data/normalizeResults/xml_sortedLists_spec1.2.json +++ b/tests/_data/normalizeResults/xml_sortedLists_spec1.2.json @@ -451,6 +451,25 @@ } ] }, + { + "type": "element", + "name": "reference", + "attributes": { + "type": "other" + }, + "children": [ + { + "type": "element", + "name": "url", + "children": "https://example.org/%22test%22" + }, + { + "type": "element", + "name": "comment", + "children": "encode anyUri: \"" + } + ] + }, { "type": "element", "name": "reference", diff --git a/tests/_data/normalizeResults/xml_sortedLists_spec1.3.json b/tests/_data/normalizeResults/xml_sortedLists_spec1.3.json index 1f66df784..64365ae98 100644 --- a/tests/_data/normalizeResults/xml_sortedLists_spec1.3.json +++ b/tests/_data/normalizeResults/xml_sortedLists_spec1.3.json @@ -503,6 +503,25 @@ } ] }, + { + "type": "element", + "name": "reference", + "attributes": { + "type": "other" + }, + "children": [ + { + "type": "element", + "name": "url", + "children": "https://example.org/%22test%22" + }, + { + "type": "element", + "name": "comment", + "children": "encode anyUri: \"" + } + ] + }, { "type": "element", "name": "reference", diff --git a/tests/_data/normalizeResults/xml_sortedLists_spec1.4.json b/tests/_data/normalizeResults/xml_sortedLists_spec1.4.json index 2663329e8..3a6bbbf91 100644 --- a/tests/_data/normalizeResults/xml_sortedLists_spec1.4.json +++ b/tests/_data/normalizeResults/xml_sortedLists_spec1.4.json @@ -503,6 +503,25 @@ } ] }, + { + "type": "element", + "name": "reference", + "attributes": { + "type": "other" + }, + "children": [ + { + "type": "element", + "name": "url", + "children": "https://example.org/%22test%22" + }, + { + "type": "element", + "name": "comment", + "children": "encode anyUri: \"" + } + ] + }, { "type": "element", "name": "reference", diff --git a/tests/_data/normalizeResults/xml_sortedLists_spec1.5.json b/tests/_data/normalizeResults/xml_sortedLists_spec1.5.json index cf9460c42..ecda6a980 100644 --- a/tests/_data/normalizeResults/xml_sortedLists_spec1.5.json +++ b/tests/_data/normalizeResults/xml_sortedLists_spec1.5.json @@ -536,6 +536,25 @@ } ] }, + { + "type": "element", + "name": "reference", + "attributes": { + "type": "other" + }, + "children": [ + { + "type": "element", + "name": "url", + "children": "https://example.org/%22test%22" + }, + { + "type": "element", + "name": "comment", + "children": "encode anyUri: \"" + } + ] + }, { "type": "element", "name": "reference", diff --git a/tests/_data/normalizeResults/xml_sortedLists_spec1.6.json b/tests/_data/normalizeResults/xml_sortedLists_spec1.6.json index 8089e5fb4..2829fcc92 100644 --- a/tests/_data/normalizeResults/xml_sortedLists_spec1.6.json +++ b/tests/_data/normalizeResults/xml_sortedLists_spec1.6.json @@ -536,6 +536,25 @@ } ] }, + { + "type": "element", + "name": "reference", + "attributes": { + "type": "other" + }, + "children": [ + { + "type": "element", + "name": "url", + "children": "https://example.org/%22test%22" + }, + { + "type": "element", + "name": "comment", + "children": "encode anyUri: \"" + } + ] + }, { "type": "element", "name": "reference", diff --git a/tests/_data/serializeResults/json_complex_spec1.2.json.bin b/tests/_data/serializeResults/json_complex_spec1.2.json.bin index d6894cecf..f9e240faf 100644 --- a/tests/_data/serializeResults/json_complex_spec1.2.json.bin +++ b/tests/_data/serializeResults/json_complex_spec1.2.json.bin @@ -145,6 +145,11 @@ "type": "other", "comment": "encode anyUri: partially encoded" }, + { + "url": "https://example.org/%22test%22", + "type": "other", + "comment": "encode anyUri: \"" + }, { "url": "https://example.org/#%7Btest%7D%7Bagain%7D", "type": "other", diff --git a/tests/_data/serializeResults/json_complex_spec1.3.json.bin b/tests/_data/serializeResults/json_complex_spec1.3.json.bin index 0e4c9e547..5cc9e7a90 100644 --- a/tests/_data/serializeResults/json_complex_spec1.3.json.bin +++ b/tests/_data/serializeResults/json_complex_spec1.3.json.bin @@ -167,6 +167,11 @@ "type": "other", "comment": "encode anyUri: partially encoded" }, + { + "url": "https://example.org/%22test%22", + "type": "other", + "comment": "encode anyUri: \"" + }, { "url": "https://example.org/#%7Btest%7D%7Bagain%7D", "type": "other", diff --git a/tests/_data/serializeResults/json_complex_spec1.4.json.bin b/tests/_data/serializeResults/json_complex_spec1.4.json.bin index 39212b41a..3b142e447 100644 --- a/tests/_data/serializeResults/json_complex_spec1.4.json.bin +++ b/tests/_data/serializeResults/json_complex_spec1.4.json.bin @@ -169,6 +169,11 @@ "type": "other", "comment": "encode anyUri: partially encoded" }, + { + "url": "https://example.org/%22test%22", + "type": "other", + "comment": "encode anyUri: \"" + }, { "url": "https://example.org/#%7Btest%7D%7Bagain%7D", "type": "other", diff --git a/tests/_data/serializeResults/json_complex_spec1.5.json.bin b/tests/_data/serializeResults/json_complex_spec1.5.json.bin index 261d45245..efc846431 100644 --- a/tests/_data/serializeResults/json_complex_spec1.5.json.bin +++ b/tests/_data/serializeResults/json_complex_spec1.5.json.bin @@ -178,6 +178,11 @@ "type": "other", "comment": "encode anyUri: partially encoded" }, + { + "url": "https://example.org/%22test%22", + "type": "other", + "comment": "encode anyUri: \"" + }, { "url": "https://example.org/#%7Btest%7D%7Bagain%7D", "type": "other", diff --git a/tests/_data/serializeResults/json_complex_spec1.6.json.bin b/tests/_data/serializeResults/json_complex_spec1.6.json.bin index 79983803b..4adc52bd7 100644 --- a/tests/_data/serializeResults/json_complex_spec1.6.json.bin +++ b/tests/_data/serializeResults/json_complex_spec1.6.json.bin @@ -178,6 +178,11 @@ "type": "other", "comment": "encode anyUri: partially encoded" }, + { + "url": "https://example.org/%22test%22", + "type": "other", + "comment": "encode anyUri: \"" + }, { "url": "https://example.org/#%7Btest%7D%7Bagain%7D", "type": "other", diff --git a/tests/_data/serializeResults/xml_complex_spec1.2.xml.bin b/tests/_data/serializeResults/xml_complex_spec1.2.xml.bin index 1a9258333..b74ebd3b0 100644 --- a/tests/_data/serializeResults/xml_complex_spec1.2.xml.bin +++ b/tests/_data/serializeResults/xml_complex_spec1.2.xml.bin @@ -102,6 +102,10 @@ https://example.org/?bar%5Btest%5D=baz%5bagain%5D encode anyUri: partially encoded + + https://example.org/%22test%22 + encode anyUri: " + https://example.org/#%7Btest%7D%7Bagain%7D encode anyUri: {} diff --git a/tests/_data/serializeResults/xml_complex_spec1.3.xml.bin b/tests/_data/serializeResults/xml_complex_spec1.3.xml.bin index bf3f198aa..d621731f4 100644 --- a/tests/_data/serializeResults/xml_complex_spec1.3.xml.bin +++ b/tests/_data/serializeResults/xml_complex_spec1.3.xml.bin @@ -114,6 +114,10 @@ https://example.org/?bar%5Btest%5D=baz%5bagain%5D encode anyUri: partially encoded + + https://example.org/%22test%22 + encode anyUri: " + https://example.org/#%7Btest%7D%7Bagain%7D encode anyUri: {} diff --git a/tests/_data/serializeResults/xml_complex_spec1.4.xml.bin b/tests/_data/serializeResults/xml_complex_spec1.4.xml.bin index a6a1371a5..6c71a80fb 100644 --- a/tests/_data/serializeResults/xml_complex_spec1.4.xml.bin +++ b/tests/_data/serializeResults/xml_complex_spec1.4.xml.bin @@ -115,6 +115,10 @@ https://example.org/?bar%5Btest%5D=baz%5bagain%5D encode anyUri: partially encoded + + https://example.org/%22test%22 + encode anyUri: " + https://example.org/#%7Btest%7D%7Bagain%7D encode anyUri: {} diff --git a/tests/_data/serializeResults/xml_complex_spec1.5.xml.bin b/tests/_data/serializeResults/xml_complex_spec1.5.xml.bin index 775294f46..bd1091f48 100644 --- a/tests/_data/serializeResults/xml_complex_spec1.5.xml.bin +++ b/tests/_data/serializeResults/xml_complex_spec1.5.xml.bin @@ -124,6 +124,10 @@ https://example.org/?bar%5Btest%5D=baz%5bagain%5D encode anyUri: partially encoded + + https://example.org/%22test%22 + encode anyUri: " + https://example.org/#%7Btest%7D%7Bagain%7D encode anyUri: {} diff --git a/tests/_data/serializeResults/xml_complex_spec1.6.xml.bin b/tests/_data/serializeResults/xml_complex_spec1.6.xml.bin index 28a42fde8..67853b76c 100644 --- a/tests/_data/serializeResults/xml_complex_spec1.6.xml.bin +++ b/tests/_data/serializeResults/xml_complex_spec1.6.xml.bin @@ -124,6 +124,10 @@ https://example.org/?bar%5Btest%5D=baz%5bagain%5D encode anyUri: partially encoded + + https://example.org/%22test%22 + encode anyUri: " + https://example.org/#%7Btest%7D%7Bagain%7D encode anyUri: {} From d6aae095c33bbd38af8d33a3ab9dd6b410a1daa8 Mon Sep 17 00:00:00 2001 From: Jan Kowalleck Date: Thu, 24 Oct 2024 12:46:58 +0200 Subject: [PATCH 5/6] fix Signed-off-by: Jan Kowalleck --- HISTORY.md | 2 +- src/_helpers/uri.ts | 1 + tests/_data/models.js | 2 +- .../json_sortedLists_spec1.2.json | 10 ++++---- .../json_sortedLists_spec1.3.json | 10 ++++---- .../json_sortedLists_spec1.4.json | 10 ++++---- .../json_sortedLists_spec1.5.json | 10 ++++---- .../json_sortedLists_spec1.6.json | 10 ++++---- .../xml_sortedLists_spec1.2.json | 24 +++++++++---------- .../xml_sortedLists_spec1.3.json | 24 +++++++++---------- .../xml_sortedLists_spec1.4.json | 24 +++++++++---------- .../xml_sortedLists_spec1.5.json | 24 +++++++++---------- .../xml_sortedLists_spec1.6.json | 24 +++++++++---------- .../json_complex_spec1.2.json.bin | 10 ++++---- .../json_complex_spec1.3.json.bin | 10 ++++---- .../json_complex_spec1.4.json.bin | 10 ++++---- .../json_complex_spec1.5.json.bin | 10 ++++---- .../json_complex_spec1.6.json.bin | 10 ++++---- .../xml_complex_spec1.2.xml.bin | 8 +++---- .../xml_complex_spec1.3.xml.bin | 8 +++---- .../xml_complex_spec1.4.xml.bin | 8 +++---- .../xml_complex_spec1.5.xml.bin | 8 +++---- .../xml_complex_spec1.6.xml.bin | 8 +++---- 23 files changed, 133 insertions(+), 132 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 8d0480ed6..7aa8af667 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -7,7 +7,7 @@ All notable changes to this project will be documented in this file. * Fixed - * Encode double-quote in URLs. ([#1154] via [#1155]) + * Encode quotation marks in URLs. ([#1154] via [#1155]) * Build * Use _TypeScript_ `v5.6.2` now, was `v5.5.3` (via [#1130]. [#1144]) * Use _webpack_ `v5.95.0` now, was `v5.93.0` (via [#1138], [#1147]) diff --git a/src/_helpers/uri.ts b/src/_helpers/uri.ts index 1af74bddb..d27237a48 100644 --- a/src/_helpers/uri.ts +++ b/src/_helpers/uri.ts @@ -20,6 +20,7 @@ Copyright (c) OWASP Foundation. All Rights Reserved. const _ESCAPES: Array<[RegExp, string]> = [ [/ /g, '%20'], [/"/g, '%22'], + [/'/g, '%27'], [/\[/g, '%5B'], [/]/g, '%5D'], [/', 'https://example.org/#'], ['encode anyUri: {}', 'https://example.org/#{test}{again}'], diff --git a/tests/_data/normalizeResults/json_sortedLists_spec1.2.json b/tests/_data/normalizeResults/json_sortedLists_spec1.2.json index fe6a54503..fb63f3787 100644 --- a/tests/_data/normalizeResults/json_sortedLists_spec1.2.json +++ b/tests/_data/normalizeResults/json_sortedLists_spec1.2.json @@ -145,11 +145,6 @@ "type": "other", "comment": "encode anyUri: partially encoded" }, - { - "url": "https://example.org/%22test%22", - "type": "other", - "comment": "encode anyUri: \"" - }, { "url": "https://example.org/#%7Btest%7D%7Bagain%7D", "type": "other", @@ -175,6 +170,11 @@ "type": "other", "comment": "encode anyUri: https" }, + { + "url": "https://example.org/this%22test%22isa%27test%27", + "type": "other", + "comment": "encode anyUri: quotation" + }, { "url": "mailto:info@example.org", "type": "other", diff --git a/tests/_data/normalizeResults/json_sortedLists_spec1.3.json b/tests/_data/normalizeResults/json_sortedLists_spec1.3.json index b0e10418b..f4514da25 100644 --- a/tests/_data/normalizeResults/json_sortedLists_spec1.3.json +++ b/tests/_data/normalizeResults/json_sortedLists_spec1.3.json @@ -167,11 +167,6 @@ "type": "other", "comment": "encode anyUri: partially encoded" }, - { - "url": "https://example.org/%22test%22", - "type": "other", - "comment": "encode anyUri: \"" - }, { "url": "https://example.org/#%7Btest%7D%7Bagain%7D", "type": "other", @@ -197,6 +192,11 @@ "type": "other", "comment": "encode anyUri: https" }, + { + "url": "https://example.org/this%22test%22isa%27test%27", + "type": "other", + "comment": "encode anyUri: quotation" + }, { "url": "mailto:info@example.org", "type": "other", diff --git a/tests/_data/normalizeResults/json_sortedLists_spec1.4.json b/tests/_data/normalizeResults/json_sortedLists_spec1.4.json index df72c2358..05e55b7ac 100644 --- a/tests/_data/normalizeResults/json_sortedLists_spec1.4.json +++ b/tests/_data/normalizeResults/json_sortedLists_spec1.4.json @@ -169,11 +169,6 @@ "type": "other", "comment": "encode anyUri: partially encoded" }, - { - "url": "https://example.org/%22test%22", - "type": "other", - "comment": "encode anyUri: \"" - }, { "url": "https://example.org/#%7Btest%7D%7Bagain%7D", "type": "other", @@ -199,6 +194,11 @@ "type": "other", "comment": "encode anyUri: https" }, + { + "url": "https://example.org/this%22test%22isa%27test%27", + "type": "other", + "comment": "encode anyUri: quotation" + }, { "url": "mailto:info@example.org", "type": "other", diff --git a/tests/_data/normalizeResults/json_sortedLists_spec1.5.json b/tests/_data/normalizeResults/json_sortedLists_spec1.5.json index da1a2f1c2..4c7aebead 100644 --- a/tests/_data/normalizeResults/json_sortedLists_spec1.5.json +++ b/tests/_data/normalizeResults/json_sortedLists_spec1.5.json @@ -178,11 +178,6 @@ "type": "other", "comment": "encode anyUri: partially encoded" }, - { - "url": "https://example.org/%22test%22", - "type": "other", - "comment": "encode anyUri: \"" - }, { "url": "https://example.org/#%7Btest%7D%7Bagain%7D", "type": "other", @@ -208,6 +203,11 @@ "type": "other", "comment": "encode anyUri: https" }, + { + "url": "https://example.org/this%22test%22isa%27test%27", + "type": "other", + "comment": "encode anyUri: quotation" + }, { "url": "mailto:info@example.org", "type": "other", diff --git a/tests/_data/normalizeResults/json_sortedLists_spec1.6.json b/tests/_data/normalizeResults/json_sortedLists_spec1.6.json index b1bd976a3..c83dfc7a9 100644 --- a/tests/_data/normalizeResults/json_sortedLists_spec1.6.json +++ b/tests/_data/normalizeResults/json_sortedLists_spec1.6.json @@ -178,11 +178,6 @@ "type": "other", "comment": "encode anyUri: partially encoded" }, - { - "url": "https://example.org/%22test%22", - "type": "other", - "comment": "encode anyUri: \"" - }, { "url": "https://example.org/#%7Btest%7D%7Bagain%7D", "type": "other", @@ -208,6 +203,11 @@ "type": "other", "comment": "encode anyUri: https" }, + { + "url": "https://example.org/this%22test%22isa%27test%27", + "type": "other", + "comment": "encode anyUri: quotation" + }, { "url": "mailto:info@example.org", "type": "other", diff --git a/tests/_data/normalizeResults/xml_sortedLists_spec1.2.json b/tests/_data/normalizeResults/xml_sortedLists_spec1.2.json index c37599d9b..c03416046 100644 --- a/tests/_data/normalizeResults/xml_sortedLists_spec1.2.json +++ b/tests/_data/normalizeResults/xml_sortedLists_spec1.2.json @@ -461,12 +461,12 @@ { "type": "element", "name": "url", - "children": "https://example.org/%22test%22" + "children": "https://example.org/#%7Btest%7D%7Bagain%7D" }, { "type": "element", "name": "comment", - "children": "encode anyUri: \"" + "children": "encode anyUri: {}" } ] }, @@ -480,12 +480,12 @@ { "type": "element", "name": "url", - "children": "https://example.org/#%7Btest%7D%7Bagain%7D" + "children": "https://example.org/#%3Ctest%3E%3Cagain%3E" }, { "type": "element", "name": "comment", - "children": "encode anyUri: {}" + "children": "encode anyUri: <>" } ] }, @@ -499,12 +499,12 @@ { "type": "element", "name": "url", - "children": "https://example.org/#%3Ctest%3E%3Cagain%3E" + "children": "https://example.org/édition" }, { "type": "element", "name": "comment", - "children": "encode anyUri: <>" + "children": "encode anyUri: non-ASCII" } ] }, @@ -518,12 +518,12 @@ { "type": "element", "name": "url", - "children": "https://example.org/édition" + "children": "https://example.org/foo%20bar%20bazz%20again+again" }, { "type": "element", "name": "comment", - "children": "encode anyUri: non-ASCII" + "children": "encode anyUri: space" } ] }, @@ -537,12 +537,12 @@ { "type": "element", "name": "url", - "children": "https://example.org/foo%20bar%20bazz%20again+again" + "children": "https://example.org/p?k=v#f" }, { "type": "element", "name": "comment", - "children": "encode anyUri: space" + "children": "encode anyUri: https" } ] }, @@ -556,12 +556,12 @@ { "type": "element", "name": "url", - "children": "https://example.org/p?k=v#f" + "children": "https://example.org/this%22test%22isa%27test%27" }, { "type": "element", "name": "comment", - "children": "encode anyUri: https" + "children": "encode anyUri: quotation" } ] }, diff --git a/tests/_data/normalizeResults/xml_sortedLists_spec1.3.json b/tests/_data/normalizeResults/xml_sortedLists_spec1.3.json index 64365ae98..c37e9cb93 100644 --- a/tests/_data/normalizeResults/xml_sortedLists_spec1.3.json +++ b/tests/_data/normalizeResults/xml_sortedLists_spec1.3.json @@ -513,12 +513,12 @@ { "type": "element", "name": "url", - "children": "https://example.org/%22test%22" + "children": "https://example.org/#%7Btest%7D%7Bagain%7D" }, { "type": "element", "name": "comment", - "children": "encode anyUri: \"" + "children": "encode anyUri: {}" } ] }, @@ -532,12 +532,12 @@ { "type": "element", "name": "url", - "children": "https://example.org/#%7Btest%7D%7Bagain%7D" + "children": "https://example.org/#%3Ctest%3E%3Cagain%3E" }, { "type": "element", "name": "comment", - "children": "encode anyUri: {}" + "children": "encode anyUri: <>" } ] }, @@ -551,12 +551,12 @@ { "type": "element", "name": "url", - "children": "https://example.org/#%3Ctest%3E%3Cagain%3E" + "children": "https://example.org/édition" }, { "type": "element", "name": "comment", - "children": "encode anyUri: <>" + "children": "encode anyUri: non-ASCII" } ] }, @@ -570,12 +570,12 @@ { "type": "element", "name": "url", - "children": "https://example.org/édition" + "children": "https://example.org/foo%20bar%20bazz%20again+again" }, { "type": "element", "name": "comment", - "children": "encode anyUri: non-ASCII" + "children": "encode anyUri: space" } ] }, @@ -589,12 +589,12 @@ { "type": "element", "name": "url", - "children": "https://example.org/foo%20bar%20bazz%20again+again" + "children": "https://example.org/p?k=v#f" }, { "type": "element", "name": "comment", - "children": "encode anyUri: space" + "children": "encode anyUri: https" } ] }, @@ -608,12 +608,12 @@ { "type": "element", "name": "url", - "children": "https://example.org/p?k=v#f" + "children": "https://example.org/this%22test%22isa%27test%27" }, { "type": "element", "name": "comment", - "children": "encode anyUri: https" + "children": "encode anyUri: quotation" } ] }, diff --git a/tests/_data/normalizeResults/xml_sortedLists_spec1.4.json b/tests/_data/normalizeResults/xml_sortedLists_spec1.4.json index 3a6bbbf91..5997d5a53 100644 --- a/tests/_data/normalizeResults/xml_sortedLists_spec1.4.json +++ b/tests/_data/normalizeResults/xml_sortedLists_spec1.4.json @@ -513,12 +513,12 @@ { "type": "element", "name": "url", - "children": "https://example.org/%22test%22" + "children": "https://example.org/#%7Btest%7D%7Bagain%7D" }, { "type": "element", "name": "comment", - "children": "encode anyUri: \"" + "children": "encode anyUri: {}" } ] }, @@ -532,12 +532,12 @@ { "type": "element", "name": "url", - "children": "https://example.org/#%7Btest%7D%7Bagain%7D" + "children": "https://example.org/#%3Ctest%3E%3Cagain%3E" }, { "type": "element", "name": "comment", - "children": "encode anyUri: {}" + "children": "encode anyUri: <>" } ] }, @@ -551,12 +551,12 @@ { "type": "element", "name": "url", - "children": "https://example.org/#%3Ctest%3E%3Cagain%3E" + "children": "https://example.org/édition" }, { "type": "element", "name": "comment", - "children": "encode anyUri: <>" + "children": "encode anyUri: non-ASCII" } ] }, @@ -570,12 +570,12 @@ { "type": "element", "name": "url", - "children": "https://example.org/édition" + "children": "https://example.org/foo%20bar%20bazz%20again+again" }, { "type": "element", "name": "comment", - "children": "encode anyUri: non-ASCII" + "children": "encode anyUri: space" } ] }, @@ -589,12 +589,12 @@ { "type": "element", "name": "url", - "children": "https://example.org/foo%20bar%20bazz%20again+again" + "children": "https://example.org/p?k=v#f" }, { "type": "element", "name": "comment", - "children": "encode anyUri: space" + "children": "encode anyUri: https" } ] }, @@ -608,12 +608,12 @@ { "type": "element", "name": "url", - "children": "https://example.org/p?k=v#f" + "children": "https://example.org/this%22test%22isa%27test%27" }, { "type": "element", "name": "comment", - "children": "encode anyUri: https" + "children": "encode anyUri: quotation" } ] }, diff --git a/tests/_data/normalizeResults/xml_sortedLists_spec1.5.json b/tests/_data/normalizeResults/xml_sortedLists_spec1.5.json index ecda6a980..1334799a3 100644 --- a/tests/_data/normalizeResults/xml_sortedLists_spec1.5.json +++ b/tests/_data/normalizeResults/xml_sortedLists_spec1.5.json @@ -546,12 +546,12 @@ { "type": "element", "name": "url", - "children": "https://example.org/%22test%22" + "children": "https://example.org/#%7Btest%7D%7Bagain%7D" }, { "type": "element", "name": "comment", - "children": "encode anyUri: \"" + "children": "encode anyUri: {}" } ] }, @@ -565,12 +565,12 @@ { "type": "element", "name": "url", - "children": "https://example.org/#%7Btest%7D%7Bagain%7D" + "children": "https://example.org/#%3Ctest%3E%3Cagain%3E" }, { "type": "element", "name": "comment", - "children": "encode anyUri: {}" + "children": "encode anyUri: <>" } ] }, @@ -584,12 +584,12 @@ { "type": "element", "name": "url", - "children": "https://example.org/#%3Ctest%3E%3Cagain%3E" + "children": "https://example.org/édition" }, { "type": "element", "name": "comment", - "children": "encode anyUri: <>" + "children": "encode anyUri: non-ASCII" } ] }, @@ -603,12 +603,12 @@ { "type": "element", "name": "url", - "children": "https://example.org/édition" + "children": "https://example.org/foo%20bar%20bazz%20again+again" }, { "type": "element", "name": "comment", - "children": "encode anyUri: non-ASCII" + "children": "encode anyUri: space" } ] }, @@ -622,12 +622,12 @@ { "type": "element", "name": "url", - "children": "https://example.org/foo%20bar%20bazz%20again+again" + "children": "https://example.org/p?k=v#f" }, { "type": "element", "name": "comment", - "children": "encode anyUri: space" + "children": "encode anyUri: https" } ] }, @@ -641,12 +641,12 @@ { "type": "element", "name": "url", - "children": "https://example.org/p?k=v#f" + "children": "https://example.org/this%22test%22isa%27test%27" }, { "type": "element", "name": "comment", - "children": "encode anyUri: https" + "children": "encode anyUri: quotation" } ] }, diff --git a/tests/_data/normalizeResults/xml_sortedLists_spec1.6.json b/tests/_data/normalizeResults/xml_sortedLists_spec1.6.json index 2829fcc92..ec7322725 100644 --- a/tests/_data/normalizeResults/xml_sortedLists_spec1.6.json +++ b/tests/_data/normalizeResults/xml_sortedLists_spec1.6.json @@ -546,12 +546,12 @@ { "type": "element", "name": "url", - "children": "https://example.org/%22test%22" + "children": "https://example.org/#%7Btest%7D%7Bagain%7D" }, { "type": "element", "name": "comment", - "children": "encode anyUri: \"" + "children": "encode anyUri: {}" } ] }, @@ -565,12 +565,12 @@ { "type": "element", "name": "url", - "children": "https://example.org/#%7Btest%7D%7Bagain%7D" + "children": "https://example.org/#%3Ctest%3E%3Cagain%3E" }, { "type": "element", "name": "comment", - "children": "encode anyUri: {}" + "children": "encode anyUri: <>" } ] }, @@ -584,12 +584,12 @@ { "type": "element", "name": "url", - "children": "https://example.org/#%3Ctest%3E%3Cagain%3E" + "children": "https://example.org/édition" }, { "type": "element", "name": "comment", - "children": "encode anyUri: <>" + "children": "encode anyUri: non-ASCII" } ] }, @@ -603,12 +603,12 @@ { "type": "element", "name": "url", - "children": "https://example.org/édition" + "children": "https://example.org/foo%20bar%20bazz%20again+again" }, { "type": "element", "name": "comment", - "children": "encode anyUri: non-ASCII" + "children": "encode anyUri: space" } ] }, @@ -622,12 +622,12 @@ { "type": "element", "name": "url", - "children": "https://example.org/foo%20bar%20bazz%20again+again" + "children": "https://example.org/p?k=v#f" }, { "type": "element", "name": "comment", - "children": "encode anyUri: space" + "children": "encode anyUri: https" } ] }, @@ -641,12 +641,12 @@ { "type": "element", "name": "url", - "children": "https://example.org/p?k=v#f" + "children": "https://example.org/this%22test%22isa%27test%27" }, { "type": "element", "name": "comment", - "children": "encode anyUri: https" + "children": "encode anyUri: quotation" } ] }, diff --git a/tests/_data/serializeResults/json_complex_spec1.2.json.bin b/tests/_data/serializeResults/json_complex_spec1.2.json.bin index f9e240faf..16eab09f2 100644 --- a/tests/_data/serializeResults/json_complex_spec1.2.json.bin +++ b/tests/_data/serializeResults/json_complex_spec1.2.json.bin @@ -145,11 +145,6 @@ "type": "other", "comment": "encode anyUri: partially encoded" }, - { - "url": "https://example.org/%22test%22", - "type": "other", - "comment": "encode anyUri: \"" - }, { "url": "https://example.org/#%7Btest%7D%7Bagain%7D", "type": "other", @@ -175,6 +170,11 @@ "type": "other", "comment": "encode anyUri: https" }, + { + "url": "https://example.org/this%22test%22isa%27test%27", + "type": "other", + "comment": "encode anyUri: quotation" + }, { "url": "mailto:info@example.org", "type": "other", diff --git a/tests/_data/serializeResults/json_complex_spec1.3.json.bin b/tests/_data/serializeResults/json_complex_spec1.3.json.bin index 5cc9e7a90..8b1ba9152 100644 --- a/tests/_data/serializeResults/json_complex_spec1.3.json.bin +++ b/tests/_data/serializeResults/json_complex_spec1.3.json.bin @@ -167,11 +167,6 @@ "type": "other", "comment": "encode anyUri: partially encoded" }, - { - "url": "https://example.org/%22test%22", - "type": "other", - "comment": "encode anyUri: \"" - }, { "url": "https://example.org/#%7Btest%7D%7Bagain%7D", "type": "other", @@ -197,6 +192,11 @@ "type": "other", "comment": "encode anyUri: https" }, + { + "url": "https://example.org/this%22test%22isa%27test%27", + "type": "other", + "comment": "encode anyUri: quotation" + }, { "url": "mailto:info@example.org", "type": "other", diff --git a/tests/_data/serializeResults/json_complex_spec1.4.json.bin b/tests/_data/serializeResults/json_complex_spec1.4.json.bin index 3b142e447..73781b989 100644 --- a/tests/_data/serializeResults/json_complex_spec1.4.json.bin +++ b/tests/_data/serializeResults/json_complex_spec1.4.json.bin @@ -169,11 +169,6 @@ "type": "other", "comment": "encode anyUri: partially encoded" }, - { - "url": "https://example.org/%22test%22", - "type": "other", - "comment": "encode anyUri: \"" - }, { "url": "https://example.org/#%7Btest%7D%7Bagain%7D", "type": "other", @@ -199,6 +194,11 @@ "type": "other", "comment": "encode anyUri: https" }, + { + "url": "https://example.org/this%22test%22isa%27test%27", + "type": "other", + "comment": "encode anyUri: quotation" + }, { "url": "mailto:info@example.org", "type": "other", diff --git a/tests/_data/serializeResults/json_complex_spec1.5.json.bin b/tests/_data/serializeResults/json_complex_spec1.5.json.bin index efc846431..f6b7ef616 100644 --- a/tests/_data/serializeResults/json_complex_spec1.5.json.bin +++ b/tests/_data/serializeResults/json_complex_spec1.5.json.bin @@ -178,11 +178,6 @@ "type": "other", "comment": "encode anyUri: partially encoded" }, - { - "url": "https://example.org/%22test%22", - "type": "other", - "comment": "encode anyUri: \"" - }, { "url": "https://example.org/#%7Btest%7D%7Bagain%7D", "type": "other", @@ -208,6 +203,11 @@ "type": "other", "comment": "encode anyUri: https" }, + { + "url": "https://example.org/this%22test%22isa%27test%27", + "type": "other", + "comment": "encode anyUri: quotation" + }, { "url": "mailto:info@example.org", "type": "other", diff --git a/tests/_data/serializeResults/json_complex_spec1.6.json.bin b/tests/_data/serializeResults/json_complex_spec1.6.json.bin index 4adc52bd7..685dc16af 100644 --- a/tests/_data/serializeResults/json_complex_spec1.6.json.bin +++ b/tests/_data/serializeResults/json_complex_spec1.6.json.bin @@ -178,11 +178,6 @@ "type": "other", "comment": "encode anyUri: partially encoded" }, - { - "url": "https://example.org/%22test%22", - "type": "other", - "comment": "encode anyUri: \"" - }, { "url": "https://example.org/#%7Btest%7D%7Bagain%7D", "type": "other", @@ -208,6 +203,11 @@ "type": "other", "comment": "encode anyUri: https" }, + { + "url": "https://example.org/this%22test%22isa%27test%27", + "type": "other", + "comment": "encode anyUri: quotation" + }, { "url": "mailto:info@example.org", "type": "other", diff --git a/tests/_data/serializeResults/xml_complex_spec1.2.xml.bin b/tests/_data/serializeResults/xml_complex_spec1.2.xml.bin index b74ebd3b0..96cd8e4f5 100644 --- a/tests/_data/serializeResults/xml_complex_spec1.2.xml.bin +++ b/tests/_data/serializeResults/xml_complex_spec1.2.xml.bin @@ -102,10 +102,6 @@ https://example.org/?bar%5Btest%5D=baz%5bagain%5D encode anyUri: partially encoded - - https://example.org/%22test%22 - encode anyUri: " - https://example.org/#%7Btest%7D%7Bagain%7D encode anyUri: {} @@ -126,6 +122,10 @@ https://example.org/p?k=v#f encode anyUri: https + + https://example.org/this%22test%22isa%27test%27 + encode anyUri: quotation + mailto:info@example.org encode anyUri: mailto diff --git a/tests/_data/serializeResults/xml_complex_spec1.3.xml.bin b/tests/_data/serializeResults/xml_complex_spec1.3.xml.bin index d621731f4..3cf5fe182 100644 --- a/tests/_data/serializeResults/xml_complex_spec1.3.xml.bin +++ b/tests/_data/serializeResults/xml_complex_spec1.3.xml.bin @@ -114,10 +114,6 @@ https://example.org/?bar%5Btest%5D=baz%5bagain%5D encode anyUri: partially encoded - - https://example.org/%22test%22 - encode anyUri: " - https://example.org/#%7Btest%7D%7Bagain%7D encode anyUri: {} @@ -138,6 +134,10 @@ https://example.org/p?k=v#f encode anyUri: https + + https://example.org/this%22test%22isa%27test%27 + encode anyUri: quotation + mailto:info@example.org encode anyUri: mailto diff --git a/tests/_data/serializeResults/xml_complex_spec1.4.xml.bin b/tests/_data/serializeResults/xml_complex_spec1.4.xml.bin index 6c71a80fb..8ddfb4b1c 100644 --- a/tests/_data/serializeResults/xml_complex_spec1.4.xml.bin +++ b/tests/_data/serializeResults/xml_complex_spec1.4.xml.bin @@ -115,10 +115,6 @@ https://example.org/?bar%5Btest%5D=baz%5bagain%5D encode anyUri: partially encoded - - https://example.org/%22test%22 - encode anyUri: " - https://example.org/#%7Btest%7D%7Bagain%7D encode anyUri: {} @@ -139,6 +135,10 @@ https://example.org/p?k=v#f encode anyUri: https + + https://example.org/this%22test%22isa%27test%27 + encode anyUri: quotation + mailto:info@example.org encode anyUri: mailto diff --git a/tests/_data/serializeResults/xml_complex_spec1.5.xml.bin b/tests/_data/serializeResults/xml_complex_spec1.5.xml.bin index bd1091f48..e2c806d65 100644 --- a/tests/_data/serializeResults/xml_complex_spec1.5.xml.bin +++ b/tests/_data/serializeResults/xml_complex_spec1.5.xml.bin @@ -124,10 +124,6 @@ https://example.org/?bar%5Btest%5D=baz%5bagain%5D encode anyUri: partially encoded - - https://example.org/%22test%22 - encode anyUri: " - https://example.org/#%7Btest%7D%7Bagain%7D encode anyUri: {} @@ -148,6 +144,10 @@ https://example.org/p?k=v#f encode anyUri: https + + https://example.org/this%22test%22isa%27test%27 + encode anyUri: quotation + mailto:info@example.org encode anyUri: mailto diff --git a/tests/_data/serializeResults/xml_complex_spec1.6.xml.bin b/tests/_data/serializeResults/xml_complex_spec1.6.xml.bin index 67853b76c..bf1e55b42 100644 --- a/tests/_data/serializeResults/xml_complex_spec1.6.xml.bin +++ b/tests/_data/serializeResults/xml_complex_spec1.6.xml.bin @@ -124,10 +124,6 @@ https://example.org/?bar%5Btest%5D=baz%5bagain%5D encode anyUri: partially encoded - - https://example.org/%22test%22 - encode anyUri: " - https://example.org/#%7Btest%7D%7Bagain%7D encode anyUri: {} @@ -148,6 +144,10 @@ https://example.org/p?k=v#f encode anyUri: https + + https://example.org/this%22test%22isa%27test%27 + encode anyUri: quotation + mailto:info@example.org encode anyUri: mailto From 2da04e7432877f2462bd7ebd11145e3a25fd139b Mon Sep 17 00:00:00 2001 From: Jan Kowalleck Date: Thu, 24 Oct 2024 12:57:20 +0200 Subject: [PATCH 6/6] fix Signed-off-by: Jan Kowalleck --- HISTORY.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index 7aa8af667..87595bb93 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -7,7 +7,7 @@ All notable changes to this project will be documented in this file. * Fixed - * Encode quotation marks in URLs. ([#1154] via [#1155]) + * Encode quotation marks in URLs ([#1154] via [#1155]) * Build * Use _TypeScript_ `v5.6.2` now, was `v5.5.3` (via [#1130]. [#1144]) * Use _webpack_ `v5.95.0` now, was `v5.93.0` (via [#1138], [#1147])