From cb3e2fe0c2e36e0f41d93015fb1b604d195f9047 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Fri, 31 May 2013 09:42:22 -0400
Subject: [PATCH] Fix displaying messages with invalid self-closing HTML tags (#1489137)

---
 tests/Framework/Washtml.php |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/tests/Framework/Washtml.php b/tests/Framework/Washtml.php
index 526b933..cb72343 100644
--- a/tests/Framework/Washtml.php
+++ b/tests/Framework/Washtml.php
@@ -55,4 +55,17 @@
         $this->assertEquals('<!-- html ignored --><!-- body ignored --><p>test</p>', $washed, "HTML invalid comments (#1487759)");
     }
 
+    /**
+     * Test fixing of invalid self-closing elements (#1489137)
+     */
+    function test_self_closing()
+    {
+        $html = "<textarea>test";
+
+        $washer = new rcube_washtml;
+        $washed = $washer->wash($html);
+
+        $this->assertRegExp('|<textarea>test</textarea>|', $washed, "Self-closing textarea (#1489137)");
+    }
+
 }

--
Gitblit v1.9.1