diff --git a/lib/simpletest/testweblib.php b/lib/simpletest/testweblib.php index c80a5e0deb6..1b144baa141 100644 --- a/lib/simpletest/testweblib.php +++ b/lib/simpletest/testweblib.php @@ -244,10 +244,16 @@ END; '
This is some text. www.moodle.com then some more text
' => '
This is some text. www.moodle.com then some more text
', //check we aren't modifying img tags 'image' => 'image', + 'image' => 'image', + //and another url within one tag + ' ' => ' ', + ' ' => ' ', //partially escaped img tag 'partially escaped img tag <img src="http://moodle.org/logo/logo-240x60.gif" />' => 'partially escaped img tag <img src="http://moodle.org/logo/logo-240x60.gif" />', //fully escaped img tag htmlspecialchars('fully escaped img tag ') => 'fully escaped img tag <img src="http://moodle.org/logo/logo-240x60.gif" />', + //Double http with www + 'One more link like http://www.moodle.org to test' => 'One more link like http://www.moodle.org to test' ); foreach ($texts as $text => $correctresult) { $msg = "Testing text: ". str_replace('%', '%%', $text) . ": %s"; // Escape original '%' so sprintf() wont get confused