Skip to content

[Bug] Store Area Marker uses Hardcoded Quotes - They should be optional #9212

@pmario

Description

@pmario

To detect the store area we use a regexp, that uses hardcoded double quotes.

var newStoreAreaMarkerRegExp = /<script class="tiddlywiki-tiddler-store" type="([^"]*)">/gi,

According to the HTML SPEC https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 it is allowed to use no quotes, single quotes or double quotes.

If users use an HTML minifier, this can lead to problems.

class=tiddlywiki-tiddler-store is perfectly fine.

type="application/json" will need quotes - single or double are allowed. The key point here is the slash /. In the spec it is explicitly listed as a character, that needs quotes.

We need to adjust the regexp. -- Since we use a regexp, we should also allow type=something/abc, even if it is not within the spec.

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