Skip to content
This repository was archived by the owner on Oct 1, 2025. It is now read-only.

Conversation

@pimlie
Copy link
Collaborator

@pimlie pimlie commented Jul 24, 2019

Resolves: #247

Quick workaround to circumvent the need for having to disable sanitization for JSON based content in script tags. Just use a json prop instead of innerHTML and the passed value is added by calling JSON.stringify on it. There is no error handling when the supplied json is faulty

@pimlie pimlie requested review from TheAlexLichter and atinux July 24, 2019 08:37
test: fix json escaping
@pimlie pimlie changed the title feat: add json prop to bypass sanitizers feat: support json content (without disabling sanitizers) Jul 24, 2019
@pimlie pimlie merged commit 51fe6ea into master Jul 24, 2019
@pimlie pimlie deleted the feat-json-prop branch July 24, 2019 12:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create a more integrated solution for including JSON-LD

2 participants