Skip to content

Commit 6302756

Browse files
committed
fix
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent 7b442c1 commit 6302756

23 files changed

+171
-6
lines changed

examples/node/javascript/example.cjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ bom.metadata.component = new CDX.Models.Component(
3131
'MyProject'
3232
)
3333
bom.metadata.component.licenses.add(lFac.makeFromString('MIT OR Apache-2.0'))
34-
bom.metadata.component.
3534

3635
const componentA = new CDX.Models.Component(
3736
CDX.Enums.ComponentType.Library,

src/_helpers/uri.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ Copyright (c) OWASP Foundation. All Rights Reserved.
1919

2020
const _ESCAPES: Array<[RegExp, string]> = [
2121
[/ /g, '%20'],
22+
[/"/g, '%22'],
2223
[/\[/g, '%5B'],
2324
[/]/g, '%5D'],
2425
[/</g, '%3C'],
2526
[/>/g, '%3E'],
2627
[/\{/g, '%7B'],
2728
[/}/g, '%7D'],
28-
[/"/, '%%22']
2929
]
3030

3131
/**
@@ -35,10 +35,10 @@ const _ESCAPES: Array<[RegExp, string]> = [
3535
*
3636
* BEST EFFORT IMPLEMENTATION
3737
*
38-
* @see {@kink http://www.w3.org/TR/xmlschema-2/#anyURI}
39-
* @see {@kink http://www.datypic.com/sc/xsd/t-xsd_anyURI.html}
40-
* @see {@kink https://datatracker.ietf.org/doc/html/rfc2396}
41-
* @see {@kink https://datatracker.ietf.org/doc/html/rfc3987}
38+
* @see {@link http://www.w3.org/TR/xmlschema-2/#anyURI}
39+
* @see {@link http://www.datypic.com/sc/xsd/t-xsd_anyURI.html}
40+
* @see {@link https://datatracker.ietf.org/doc/html/rfc2396}
41+
* @see {@link https://datatracker.ietf.org/doc/html/rfc3987}
4242
*/
4343
export function escapeUri<T extends (string | undefined)> (value: T): T {
4444
if (value === undefined) {

tests/_data/models.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ module.exports.createComplexStructure = function () {
284284
['encode anyUri: mailto', 'mailto:[email protected]'],
285285
['encode anyUri: relative path', '../foo/bar'],
286286
['encode anyUri: space', 'https://example.org/foo bar bazz%20again+again'],
287+
['encode anyUri: "', 'https://example.org/"test"'],
287288
['encode anyUri: []', 'https://example.org/?bar[test]=baz[again]'],
288289
['encode anyUri: <>', 'https://example.org/#<test><again>'],
289290
['encode anyUri: {}', 'https://example.org/#{test}{again}'],

tests/_data/normalizeResults/json_sortedLists_spec1.2.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/_data/normalizeResults/json_sortedLists_spec1.3.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/_data/normalizeResults/json_sortedLists_spec1.4.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/_data/normalizeResults/json_sortedLists_spec1.5.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/_data/normalizeResults/json_sortedLists_spec1.6.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/_data/normalizeResults/xml_sortedLists_spec1.2.json

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/_data/normalizeResults/xml_sortedLists_spec1.3.json

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)