Skip to content

Sanitise all Wysiwyg field type using Keystone after hook #30

Open
@ticidesign

Description

@ticidesign

If the content of the WYSIWYG is stored as HTML the only option I know is to set the inner HTML, dangerously - but obviously with strict limits and sanitation.

Here is a really simple example where I just strip the HTML on the input (expecting markdown)
https://github.com/keystonejs/keystone-jamstack-plus/blob/master/schema/comment.js#L66

NPM package: https://www.npmjs.com/package/sanitize-html

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