1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-04 21:28:06 +02:00

feat: Add support for CSS aspect-ratio (#408)

This commit is contained in:
Erik
2024-06-27 21:12:06 +02:00
committed by GitHub
parent d9fbef8e27
commit 93bee73349
4 changed files with 81 additions and 0 deletions

View File

@@ -304,6 +304,13 @@ class HTMLPurifier_CSSDefinition extends HTMLPurifier_Definition
$trusted_max_wh
);
$this->info['aspect-ratio'] = new HTMLPurifier_AttrDef_CSS_Multiple(
new HTMLPurifier_AttrDef_CSS_Composite([
new HTMLPurifier_AttrDef_CSS_Ratio(),
new HTMLPurifier_AttrDef_Enum(['auto']),
])
);
// text-decoration and related shorthands
$this->info['text-decoration'] = new HTMLPurifier_AttrDef_CSS_TextDecoration();