diff --git a/filter/emailprotect/classes/text_filter.php b/filter/emailprotect/classes/text_filter.php index 6a0c526a3e6..42c58a3229d 100644 --- a/filter/emailprotect/classes/text_filter.php +++ b/filter/emailprotect/classes/text_filter.php @@ -39,12 +39,10 @@ class text_filter extends \core_filters\text_filter { // Pattern to find a mailto link with the linked text. $pattern = '|()' . '(.*)' . '()|iU'; - $text = preg_replace_callback($pattern, 'filter_emailprotect_alter_mailto', $text); $text = preg_replace_callback($pattern, [self::class, 'alter_mailto'], $text); // Pattern to find any other email address in the text. $pattern = '/(^|\s+|>)' . $emailregex . '($|\s+|\.\s+|\.$|<)/i'; - $text = preg_replace_callback($pattern, 'filter_emailprotect_alter_email', $text); $text = preg_replace_callback($pattern, [self::class, 'alter_email'], $text); return $text;