html-sanitizer icon indicating copy to clipboard operation
html-sanitizer copied to clipboard

Add possibility to declare and apply presets to behavior

Open ohader opened this issue 3 years ago • 0 comments

use TYPO3\HtmlSanitizer\Behavior;
use TYPO3\HtmlSanitizer\Builder\Preset\IframePreset;

$behavior = (new Behavior())
    ->withFlags(Behavior::ENCODE_INVALID_TAG | Behavior::REMOVE_UNEXPECTED_CHILDREN)
    ->withName('scenario-test')
    ->withPreset(new IframePreset());

ohader avatar Oct 19 '22 15:10 ohader