From c90e16721a0660dc2dedbd31a9df428e03b7ff13 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 3 Jul 2009 18:26:35 +0000 Subject: - Patch #359276 by Freso, Heine, lyricnz: avoid double encoding/decoding of HTML entities. --- modules/filter/filter.test | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'modules') diff --git a/modules/filter/filter.test b/modules/filter/filter.test index a9738a97a..cf06b6da3 100644 --- a/modules/filter/filter.test +++ b/modules/filter/filter.test @@ -399,6 +399,15 @@ class FilterTestCase extends DrupalWebTestCase { $f = filter_xss("\xc0aaa"); $this->assertEqual($f, '', t('HTML filter -- overlong UTF-8 sequences.')); + + $f = filter_xss("Who's Online"); + $this->assertNormalized($f, "who's online", t('HTML filter -- html entity number')); + + $f = filter_xss("Who's Online"); + $this->assertNormalized($f, "who's online", t('HTML filter -- encoded html entity number')); + + $f = filter_xss("Who' Online"); + $this->assertNormalized($f, "who' online", t('HTML filter -- double encoded html entity number')); } /** -- cgit v1.2.3