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));