diff --git a/filter/urltolink/filter.php b/filter/urltolink/filter.php
index 9d01e8d0eb6..290e7ed3cdf 100644
--- a/filter/urltolink/filter.php
+++ b/filter/urltolink/filter.php
@@ -123,6 +123,7 @@ class filter_urltolink extends moodle_text_filter {
}
// TODO MDL-21296 - use of unicode modifiers may cause a timeout
+ $urlstart = '(?:http(s)?://|(?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
',
+ 'image
' => 'image
',
+ 'image
' => 'image
',
//and another url within one tag
'