Skip to content

JSON-LD script elements (data blocks) MUST only contain valid JSON #96

Closed
@BigBlueHat

Description

@BigBlueHat

The current editor's draft suggests wrapping JSON-LD in a data block with <!-- and --> to avoid some HTML parsing situations. Ultimately, that means that we're suggesting that the contents of an embedded JSON-LD data block is legally invalid JSON-LD...which seems bad...

Consequently, I'd like to propose that we only specify the entity encoding of certain strings within the JSON-LD contents to avoid the potential HTML parsing mishaps described in HTML's Restrictions on contents of script elements section.

Doing that avoids encouraging invalid JSON-LD and removes the additional unique parsing steps for cleaning out the wrapping <!-- and -->.

PR forthcoming.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions