Skip to content

Html base atrisk #136

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
247 changes: 103 additions & 144 deletions index.html

Large diffs are not rendered by default.

36 changes: 0 additions & 36 deletions tests/compact-manifest.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -1292,42 +1292,6 @@
"input": "compact/ep15-in.jsonld",
"context": "compact/ep15-context.jsonld",
"expect": "invalid container mapping"
}, {
"@id": "#th001",
"@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
"name": "Compacts embedded JSON-LD script element",
"purpose": "Tests embedded JSON-LD in HTML",
"input": "compact/h001-in.html",
"context": "compact/h001-context.jsonld",
"expect": "compact/h001-out.jsonld",
"option": {"specVersion": "json-ld-1.1"}
}, {
"@id": "#th002",
"@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
"name": "Compacts first embedded JSON-LD script element",
"purpose": "Tests embedded JSON-LD in HTML",
"input": "compact/h002-in.html",
"context": "compact/h002-context.jsonld",
"expect": "compact/h002-out.jsonld",
"option": {"specVersion": "json-ld-1.1"}
}, {
"@id": "#th003",
"@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
"name": "Compacts targeted JSON-LD script element",
"purpose": "Tests embedded JSON-LD in HTML with fragment identifier",
"input": "compact/h003-in.html#second",
"context": "compact/h003-context.jsonld",
"expect": "compact/h003-out.jsonld",
"option": {"specVersion": "json-ld-1.1"}
}, {
"@id": "#th004",
"@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
"name": "Compacts all embedded JSON-LD script elements with extractAllScripts option",
"purpose": "Tests embedded JSON-LD in HTML extracting all elements",
"input": "compact/h004-in.html",
"context": "compact/h004-context.jsonld",
"expect": "compact/h004-out.jsonld",
"option": {"specVersion": "json-ld-1.1", "extractAllScripts": true}
}, {
"@id": "#tin01",
"@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
Expand Down
160 changes: 0 additions & 160 deletions tests/expand-manifest.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -1524,166 +1524,6 @@
"input": "expand/es02-in.jsonld",
"expect": "invalid container mapping",
"option": {"processingMode": "json-ld-1.1", "specVersion": "json-ld-1.1"}
}, {
"@id": "#th001",
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
"name": "Expands embedded JSON-LD script element",
"purpose": "Tests embedded JSON-LD in HTML",
"input": "expand/h001-in.html",
"expect": "expand/h001-out.jsonld",
"option": {"specVersion": "json-ld-1.1"}
}, {
"@id": "#th002",
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
"name": "Expands first embedded JSON-LD script element",
"purpose": "Tests embedded JSON-LD in HTML",
"input": "expand/h002-in.html",
"expect": "expand/h002-out.jsonld",
"option": {"specVersion": "json-ld-1.1"}
}, {
"@id": "#th003",
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
"name": "Expands targeted JSON-LD script element",
"purpose": "Tests embedded JSON-LD in HTML with fragment identifier",
"input": "expand/h003-in.html#second",
"expect": "expand/h003-out.jsonld",
"option": {"specVersion": "json-ld-1.1"}
}, {
"@id": "#th004",
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
"name": "Expands all embedded JSON-LD script elements with extractAllScripts option",
"purpose": "Tests embedded JSON-LD in HTML extracting all elements",
"input": "expand/h004-in.html",
"expect": "expand/h004-out.jsonld",
"option": {"specVersion": "json-ld-1.1", "extractAllScripts": true}
}, {
"@id": "#th005",
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
"name": "Expands multiple embedded JSON-LD script elements where one is an array",
"purpose": "Tests embedded JSON-LD in HTML extracting all elements with array",
"input": "expand/h005-in.html",
"expect": "expand/h005-out.jsonld",
"option": {"specVersion": "json-ld-1.1", "extractAllScripts": true}
}, {
"@id": "#th006",
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
"name": "Expands as empty with no embedded JSON-LD script elements",
"purpose": "Tests embedded JSON-LD in HTML when none exist",
"input": "expand/h006-in.html",
"expect": "expand/h006-out.jsonld",
"option": {"specVersion": "json-ld-1.1"}
}, {
"@id": "#th007",
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
"name": "Expands as empty with no embedded JSON-LD script elements and extractAllScripts",
"purpose": "Tests embedded JSON-LD in HTML when none exist extracting all elements",
"input": "expand/h007-in.html",
"expect": "expand/h007-out.jsonld",
"option": {"specVersion": "json-ld-1.1", "extractAllScripts": true}
}, {
"@id": "#th010",
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
"name": "Expands embedded JSON-LD script element with HTML character references",
"purpose": "Tests embedded JSON-LD in HTML with character references",
"input": "expand/h010-in.html",
"expect": "expand/h010-out.jsonld",
"option": {"specVersion": "json-ld-1.1"}
}, {
"@id": "#th011",
"@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
"name": "Errors if no element found at target",
"purpose": "Tests embedded JSON-LD in HTML with fragment identifier that doesn't exist",
"input": "expand/h011-in.html#third",
"expect": "invalid script element",
"option": {"specVersion": "json-ld-1.1"}
}, {
"@id": "#th012",
"@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
"name": "Errors if targeted element is not a script element",
"purpose": "Tests embedded JSON-LD in HTML which isn't a script element",
"input": "expand/h012-in.html#first",
"expect": "invalid script element",
"option": {"specVersion": "json-ld-1.1"}
}, {
"@id": "#th013",
"@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
"name": "Errors if targeted element does not have type application/ld+json",
"purpose": "Tests embedded JSON-LD in HTML with wrong type",
"input": "expand/h013-in.html#first",
"expect": "invalid script element",
"option": {"specVersion": "json-ld-1.1"}
}, {
"@id": "#th014",
"@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
"name": "Errors if uncommented script text contains comment",
"purpose": "Tests embedded JSON-LD in HTML with comments leftover",
"input": "expand/h014-in.html",
"expect": "invalid script element",
"option": {"specVersion": "json-ld-1.1"}
}, {
"@id": "#th015",
"@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
"name": "Errors if end comment missing",
"purpose": "Tests embedded JSON-LD in HTML with unballanced comments",
"input": "expand/h015-in.html",
"expect": "invalid script element",
"option": {"specVersion": "json-ld-1.1"}
}, {
"@id": "#th016",
"@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
"name": "Errors if start comment missing",
"purpose": "Tests embedded JSON-LD in HTML with unballanced comments",
"input": "expand/h016-in.html",
"expect": "invalid script element",
"option": {"specVersion": "json-ld-1.1"}
}, {
"@id": "#th017",
"@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
"name": "Errors if uncommented script is not valid JSON",
"purpose": "Tests embedded JSON-LD in HTML which is invalid JSON",
"input": "expand/h017-in.html",
"expect": "invalid script element",
"option": {"specVersion": "json-ld-1.1"}
}, {
"@id": "#th018",
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
"name": "Expands embedded JSON-LD script element relative to document base",
"purpose": "Tests embedded JSON-LD in HTML",
"input": "expand/h018-in.html",
"expect": "expand/h018-out.jsonld",
"option": {"specVersion": "json-ld-1.1"}
}, {
"@id": "#th019",
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
"name": "Expands embedded JSON-LD script element relative to base option",
"purpose": "Tests embedded JSON-LD in HTML",
"input": "expand/h019-in.html",
"expect": "expand/h019-out.jsonld",
"option": {"specVersion": "json-ld-1.1", "base": "http://a.example.com/doc"}
}, {
"@id": "#th020",
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
"name": "Expands embedded JSON-LD script element relative to HTML base",
"purpose": "Tests embedded JSON-LD in HTML",
"input": "expand/h020-in.html",
"expect": "expand/h020-out.jsonld",
"option": {"specVersion": "json-ld-1.1", "base": "http://a.example.com/doc"}
}, {
"@id": "#th021",
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
"name": "Expands embedded JSON-LD script element relative to relative HTML base",
"purpose": "Tests embedded JSON-LD in HTML",
"input": "expand/h021-in.html",
"expect": "expand/h021-out.jsonld",
"option": {"specVersion": "json-ld-1.1", "base": "http://a.example.com/doc"}
}, {
"@id": "#th022",
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
"name": "Expands targeted JSON-LD script element with fragment and HTML base",
"purpose": "Tests embedded JSON-LD in HTML with fragment identifier",
"input": "expand/h022-in.html#second",
"expect": "expand/h022-out.jsonld",
"option": {"specVersion": "json-ld-1.1"}
}, {
"@id": "#tin01",
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
Expand Down
4 changes: 0 additions & 4 deletions tests/expand/h018-out.jsonld

This file was deleted.

36 changes: 0 additions & 36 deletions tests/flatten-manifest.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -358,42 +358,6 @@
"option": {"specVersion": "json-ld-1.1"},
"input": "flatten/e001-in.jsonld",
"expect": "conflicting indexes"
}, {
"@id": "#th001",
"@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
"name": "Flattens embedded JSON-LD script element",
"purpose": "Tests embedded JSON-LD in HTML",
"input": "flatten/h001-in.html",
"context": "flatten/h001-context.jsonld",
"expect": "flatten/h001-out.jsonld",
"option": {"specVersion": "json-ld-1.1"}
}, {
"@id": "#th002",
"@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
"name": "Flattens first embedded JSON-LD script element",
"purpose": "Tests embedded JSON-LD in HTML",
"input": "flatten/h002-in.html",
"context": "flatten/h002-context.jsonld",
"expect": "flatten/h002-out.jsonld",
"option": {"specVersion": "json-ld-1.1", "extractAllScripts": false}
}, {
"@id": "#th003",
"@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
"name": "Flattens targeted JSON-LD script element",
"purpose": "Tests embedded JSON-LD in HTML with fragment identifier",
"input": "flatten/h003-in.html#second",
"context": "flatten/h003-context.jsonld",
"expect": "flatten/h003-out.jsonld",
"option": {"specVersion": "json-ld-1.1"}
}, {
"@id": "#th004",
"@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
"name": "Flattens all script elements by default",
"purpose": "Tests embedded JSON-LD in HTML with fragment identifier",
"input": "flatten/h004-in.html",
"context": "flatten/h004-context.jsonld",
"expect": "flatten/h004-out.jsonld",
"option": {"specVersion": "json-ld-1.1"}
}, {
"@id": "#tin01",
"@type": ["jld:PositiveEvaluationTest", "jld:FlattenTest"],
Expand Down
Loading