|
@@ -606,6 +606,20 @@ class Zend_Filter_StripTagsTest extends PHPUnit_Framework_TestCase
|
|
|
$expected = 'text';
|
|
$expected = 'text';
|
|
|
$this->assertEquals($expected, $this->_filter->filter($input));
|
|
$this->assertEquals($expected, $this->_filter->filter($input));
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @group ZF-11617
|
|
|
|
|
+ */
|
|
|
|
|
+ public function testFilterCanAllowHyphenatedAttributeNames()
|
|
|
|
|
+ {
|
|
|
|
|
+ $input = '<li data-disallowed="no!" data-name="Test User" data-id="11223"></li>';
|
|
|
|
|
+ $expected = '<li data-name="Test User" data-id="11223"></li>';
|
|
|
|
|
+
|
|
|
|
|
+ $this->_filter->setTagsAllowed('li');
|
|
|
|
|
+ $this->_filter->setAttributesAllowed(array('data-id','data-name'));
|
|
|
|
|
+
|
|
|
|
|
+ $this->assertEquals($expected, $this->_filter->filter($input));
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// Call Zend_Filter_StripTagsTest::main() if this source file is executed directly.
|
|
// Call Zend_Filter_StripTagsTest::main() if this source file is executed directly.
|