From 6cc09234be017ff0b570c6b1898bb8cf151dbe87 Mon Sep 17 00:00:00 2001 From: Tim Hunt Date: Thu, 16 Dec 2010 15:36:24 +0000 Subject: [PATCH] MDL-24060 text_to_html tests. Make sure alt text for LaTeX images doesn't break. --- lib/simpletest/testweblib.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/simpletest/testweblib.php b/lib/simpletest/testweblib.php index 7f9b000e6d6..4af49a1d431 100644 --- a/lib/simpletest/testweblib.php +++ b/lib/simpletest/testweblib.php @@ -123,6 +123,10 @@ class web_test extends UnitTestCase { $this->assertEqual('[edit]', html_to_text('edit')); } + public function test_html_to_text_image_with_backslash() { + $this->assertEqual('[\edit]', html_to_text('\edit')); + } + public function test_html_to_text_nowrap() { $long = "Here is a long string, more than 75 characters long, since by default html_to_text wraps text at 75 chars."; $this->assertEqual($long, html_to_text($long, 0));