diff --git a/core/htmlsanitizer.class.inc.php b/core/htmlsanitizer.class.inc.php index 8d8b14dbf..fbc94a4f6 100644 --- a/core/htmlsanitizer.class.inc.php +++ b/core/htmlsanitizer.class.inc.php @@ -286,8 +286,8 @@ class HTMLDOMSanitizer extends DOMSanitizer 'strong' => array(), 'img' => array('src', 'style', 'alt', 'title'), 'ul' => array('style'), - 'ol' => array('style'), - 'li' => array('style'), + 'ol' => array('reversed', 'start', 'style', 'type'), + 'li' => array('style', 'value'), 'h1' => array('style'), 'h2' => array('style'), 'h3' => array('style'), diff --git a/test/core/sanitizer/HTMLDOMSanitizerTest.php b/test/core/sanitizer/HTMLDOMSanitizerTest.php index 1f3233158..f1fbfc4fb 100644 --- a/test/core/sanitizer/HTMLDOMSanitizerTest.php +++ b/test/core/sanitizer/HTMLDOMSanitizerTest.php @@ -86,8 +86,8 @@ class HTMLDOMSanitizerTest extends AbstractDOMSanitizerTest 'strong' => array(), 'img' => array('src', 'style', 'alt', 'title'), 'ul' => array('style'), - 'ol' => array('style'), - 'li' => array('style'), + 'ol' => array('reversed', 'start', 'style', 'type'), + 'li' => array('style', 'value'), 'h1' => array('style'), 'h2' => array('style'), 'h3' => array('style'), @@ -213,6 +213,12 @@ class HTMLDOMSanitizerTest extends AbstractDOMSanitizerTest 'html' => 'bar', 'expected' => 'bar', ), + + 'ordered list with attributes' => array( + 'html' => '
  1. Some list item
', + 'expected' => '
  1. Some list item
', + ), + ); }