Skip to content

[Bug] Invalid JSON if string contains " or \ in multiple phtml files #87

@wubinworks

Description

@wubinworks

(Thank you for providing an open source solution of Rich Snippets)

File

breadcrumbs.phtml#L36

Reproduce

Create a category and let its name contains " or \.

Output(invalid JSON):

{
    ...
    "item": {
        "@id": "",
        "name": "Some\Category\Name"
    }
    ...
}

Expected result

" or \ should be escaped to \" or \\

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