diff --git a/library/HTMLPurifier/CSSDefinition.php b/library/HTMLPurifier/CSSDefinition.php
index 3732c076..923d6f3d 100644
--- a/library/HTMLPurifier/CSSDefinition.php
+++ b/library/HTMLPurifier/CSSDefinition.php
@@ -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'] =
diff --git a/tests/HTMLPurifier/AttrDef/CSSTest.php b/tests/HTMLPurifier/AttrDef/CSSTest.php
index 82e07bb6..049c56a5 100644
--- a/tests/HTMLPurifier/AttrDef/CSSTest.php
+++ b/tests/HTMLPurifier/AttrDef/CSSTest.php
@@ -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;');