diff --git a/lib/Formats/HTMLPurifier_AttrDef_HTML_Microformats2.php b/lib/Formats/HTMLPurifier_AttrDef_HTML_Microformats2.php index 5d19c8e..d3d506f 100644 --- a/lib/Formats/HTMLPurifier_AttrDef_HTML_Microformats2.php +++ b/lib/Formats/HTMLPurifier_AttrDef_HTML_Microformats2.php @@ -32,7 +32,7 @@ class HTMLPurifier_AttrDef_HTML_Microformats2 extends HTMLPurifier_AttrDef_HTML_ { $ret = array(); foreach ($tokens as $token) { - if(preg_match('/^([hpue]|dt)-.+/', $token)) { + if(preg_match('/^([hpue]|dt)-[a-z\-]+$/', $token)) { $ret[] = $token; } } diff --git a/tests/SanitizeTest.php b/tests/SanitizeTest.php index c123ee0..1d1dbb9 100644 --- a/tests/SanitizeTest.php +++ b/tests/SanitizeTest.php @@ -79,6 +79,7 @@ class SanitizeTest extends PHPUnit_Framework_TestCase { $this->assertEquals('entry', $data['data']['type']); $this->assertContains('