html-sanitizer
html-sanitizer copied to clipboard
[FEATURE] Add possibility to declare and apply presets to behavior
Example (uses preset declaring <iframe> and applies it):
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());
Related: #91
Separate PresetInterface from specific implementations. Besides IFramePreset the might be a ScriptJsonLdPreset (#71).