From d727e3b51654e3f203f99b416627d238de01cb30 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 16 Dec 2015 09:53:18 +0000 Subject: [PATCH] KSES: Allow the `reversed` attribute for `
    `. Props lancewillett. Fixes #35079. git-svn-id: https://develop.svn.wordpress.org/trunk@35960 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/kses.php | 1 + tests/phpunit/tests/kses.php | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/src/wp-includes/kses.php b/src/wp-includes/kses.php index d34608b89f..20d6b9d5dd 100644 --- a/src/wp-includes/kses.php +++ b/src/wp-includes/kses.php @@ -398,6 +398,7 @@ if ( ! CUSTOM_TAGS ) { 'ol' => array( 'start' => true, 'type' => true, + 'reversed' => true, ), 'var' => array(), 'video' => array( diff --git a/tests/phpunit/tests/kses.php b/tests/phpunit/tests/kses.php index c4c1e8e24c..e105813449 100644 --- a/tests/phpunit/tests/kses.php +++ b/tests/phpunit/tests/kses.php @@ -653,4 +653,15 @@ EOF; $this->assertEquals( $input, wp_kses( $input, $allowedposttags ) ); } + + /** + * @ticket 35079 + */ + function test_ol_reversed() { + global $allowedposttags; + + $input = '
    1. Item 1
    2. Item 2
    3. Item 3
    '; + + $this->assertEquals( $input, wp_kses( $input, $allowedposttags ) ); + } }