From 28391b4ec32d25f688f9d8a96a66e484d6864e67 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Thu, 12 Apr 2012 06:07:10 -0400
Subject: [PATCH] - Fix "false" placeholder in contact notes textarea

---
 tests/html_to_text.php |   19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/tests/html_to_text.php b/tests/html_to_text.php
index c1d40d9..aabc1a8 100644
--- a/tests/html_to_text.php
+++ b/tests/html_to_text.php
@@ -32,14 +32,29 @@
                 'in'    => '&amp;quot;',
                 'out'   => '&quot;',
             ),
+            3 => array(
+                'title' => 'HTML entity in STRONG tag',
+                'in'    => '<strong>&#347;</strong>', // ś
+                'out'   => 'Ś', // upper ś
+            ),
+            4 => array(
+                'title' => 'STRONG tag to upper-case conversion',
+                'in'    => '<strong>ś</strong>',
+                'out'   => 'Ś',
+            ),
+            5 => array(
+                'title' => 'STRONG inside B tag',
+                'in'    => '<b><strong>&#347;</strong></b>',
+                'out'   => 'Ś',
+            ),
         );
 
         $ht = new html2text(null, false, false);
 
-        foreach ($data as $item) {
+        foreach ($data as $idx => $item) {
             $ht->set_html($item['in']);
             $res = $ht->get_text();
-            $this->assertEqual($item['out'], $res, $item['title']);
+            $this->assertEqual($item['out'], $res, $item['title'] . "($idx)");
         }
     }
 

--
Gitblit v1.9.1