Skip to content

Commit

Permalink
feat: Add CSS direction support (#429)
Browse files Browse the repository at this point in the history
  • Loading branch information
sp-mklonteig authored Nov 22, 2024
1 parent 5d154a2 commit 63e631e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions library/HTMLPurifier/CSSDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ protected function doSetup($config)
false
);

$this->info['direction'] = new HTMLPurifier_AttrDef_Enum(
['ltr', 'rtl'],
false
);

$border_style =
$this->info['border-bottom-style'] =
$this->info['border-right-style'] =
Expand Down
2 changes: 2 additions & 0 deletions tests/HTMLPurifier/AttrDef/CSSTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ public function test()
{
// 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;');
Expand Down

0 comments on commit 63e631e

Please sign in to comment.