Skip to content

[Improvement]: Allow custom HTML sanitizer implementation for WYSIWYG content #18681

@dolmit-tanel-paaro

Description

@dolmit-tanel-paaro

Improvement description

Issue
As a developer I can't introduce a custom HTML sanitizer for WYSIWYG content.

For example:

services:
    App\HtmlSanitizer\HtmlSanitizer:
        decorates: html_sanitizer.sanitizer.pimcore.wysiwyg_sanitizer

This will cause an issue because of the typehint - WYSIWYG HTML sanitizer can only be of Symfony\Component\HtmlSanitizer\HtmlSanitizer type:

Can't solve this issue by extending the Symfony's class because it's marked as final: https://github.com/symfony/html-sanitizer/blob/7.3/HtmlSanitizer.php#L23

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions