0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2024-12-22 08:21:52 +00:00

feat: Add CSS direction support (#429)

This commit is contained in:
Morgan Klonteig 2024-11-21 20:46:53 -08:00 committed by GitHub
parent 5d154a2393
commit 63e631ebd3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 0 deletions

View File

@ -26,6 +26,11 @@ class HTMLPurifier_CSSDefinition extends HTMLPurifier_Definition
false
);
$this->info['direction'] = new HTMLPurifier_AttrDef_Enum(
['ltr', 'rtl'],
false
);
$border_style =
$this->info['border-bottom-style'] =
$this->info['border-right-style'] =

View File

@ -13,6 +13,8 @@ class HTMLPurifier_AttrDef_CSSTest extends HTMLPurifier_AttrDefHarness
{
// regular cases, singular
$this->assertDef('text-align:right;');
$this->assertDef('direction:ltr;');
$this->assertDef('direction:rtl;');
$this->assertDef('border-left-style:solid;');
$this->assertDef('border-style:solid dotted;');
$this->assertDef('clear:right;');