From 02ab2c69bb26bf3d4fe6bcc199fe032bdfe96b29 Mon Sep 17 00:00:00 2001 From: Peter Westwood Date: Wed, 27 Nov 2013 14:44:57 +0000 Subject: [PATCH] Unit Tests: Add some simple test cases to highlight the types of html entity that kses currently blocks. See #26290 git-svn-id: https://develop.svn.wordpress.org/trunk@26430 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/kses.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/phpunit/tests/kses.php b/tests/phpunit/tests/kses.php index 6690797e9d..ef28686a6a 100644 --- a/tests/phpunit/tests/kses.php +++ b/tests/phpunit/tests/kses.php @@ -359,4 +359,19 @@ EOF; $this->assertEquals( $allowedposttags, wp_kses_allowed_html( 'post' ) ); $this->assertEquals( $allowedtags, wp_kses_allowed_html( 'data' ) ); } + + /** + * @ticket + */ + public function test_wp_kses_normalize_entities() { + $this->assertEquals( '♠', wp_kses_normalize_entities( '♠' ) ); + + $this->assertEquals( '¹', wp_kses_normalize_entities( '¹' ) ); + $this->assertEquals( '²', wp_kses_normalize_entities( '²' ) ); + $this->assertEquals( '³', wp_kses_normalize_entities( '³' ) ); + $this->assertEquals( '¼', wp_kses_normalize_entities( '¼' ) ); + $this->assertEquals( '½', wp_kses_normalize_entities( '½' ) ); + $this->assertEquals( '¾', wp_kses_normalize_entities( '¾' ) ); + $this->assertEquals( '∴', wp_kses_normalize_entities( '∴' ) ); + } }