Skip to content

Ensure to document compatibility with Trusted Types createHTML #297

@evilpie

Description

@evilpie

The createHTML function in the TrustedTypePolicy takes a string input and is supposed to return a sanitized version of that HTML. This is a pretty obvious use case fo the Sanitizer API. However since we removed the methods for actually sanitizing to a string from the API, there is actually no direct way of doing this. One of the main reasons for the removal were concerns about reparsing HTML actually being unsafe. I think we might want to think about some way of integrating the Sanitizer and Trusted Types that wouldn't involve any reparsing and intermediate HTML strings.

/cc @lukewarlow @fred-wang

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions