summaryrefslogtreecommitdiff
path: root/tests/Framework/Washtml.php
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-04-11 09:13:59 +0200
committerAleksander Machniak <alec@alec.pl>2014-04-11 09:13:59 +0200
commitf96fec6b8cceb5d4f25cc1cd7c50c4c200905a8c (patch)
tree8c011b8017d57fb64d262e6bb1e30c8eb1c72a10 /tests/Framework/Washtml.php
parent9155f3de2a333c45c7314c15e3e6594b456dbbae (diff)
Fix "washing" of unicoded style attributes (#1489777)
Diffstat (limited to 'tests/Framework/Washtml.php')
-rw-r--r--tests/Framework/Washtml.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/Framework/Washtml.php b/tests/Framework/Washtml.php
index f98a8a781..ab1ada05f 100644
--- a/tests/Framework/Washtml.php
+++ b/tests/Framework/Washtml.php
@@ -144,11 +144,19 @@ class Framework_Washtml extends PHPUnit_Framework_TestCase
function test_style_unicode()
{
$html = "<html><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />
- <body><span style='font-family:\"新細明體\",\"serif\";color:red'>令全場爆滿</span></body></html>";
+ <body><span style='font-family:\"新細明體\",\"serif\";color:red'>test</span></body></html>";
$washer = new rcube_washtml;
$washed = $washer->wash($html);
- $this->assertRegExp('|style=\'font-family: "新細明體","serif"; color: red\'|', $washed, "Unicode chars in style attribute (#1489697)");
+ $this->assertRegExp('|style=\'font-family: "新細明體","serif"; color: red\'|', $washed, "Unicode chars in style attribute - quoted (#1489697)");
+
+ $html = "<html><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />
+ <body><span style='font-family:新細明體;color:red'>test</span></body></html>";
+
+ $washer = new rcube_washtml;
+ $washed = $washer->wash($html);
+
+ $this->assertRegExp('|style="font-family: 新細明體; color: red"|', $washed, "Unicode chars in style attribute (#1489697)");
}
}