Code Duplication    Length = 3-3 lines in 2 locations

manager/includes/document.parser.class.inc.php 2 locations

@@ 5715-5717 (lines=3) @@
5712
            if (is_array($val)) {
5713
                foreach ($val as $key2 => $val2) {
5714
                    $val2 = $this->parseText($val2, $ph);
5715
                    if (preg_match($regexUrl, $val2, $url)) {
5716
                        $val2 = preg_replace($regexUrl, "<a href=\"{$url[0]}\" target=\"_blank\">{$url[0]}</a> ", $val2);
5717
                    }
5718
                    if (preg_match($regexEmail, $val2, $url)) {
5719
                        $val2 = preg_replace($regexEmail, '<a href="mailto:\\1' . $emailSubject . '">\\1</a>', $val2);
5720
                    }
@@ 5725-5727 (lines=3) @@
5722
                }
5723
            } else {
5724
                $val = $this->parseText($val, $ph);
5725
                if (preg_match($regexUrl, $val, $url)) {
5726
                    $val = preg_replace($regexUrl, "<a href=\"{$url[0]}\" target=\"_blank\">{$url[0]}</a> ", $val);
5727
                }
5728
                if (preg_match($regexEmail, $val, $url)) {
5729
                    $val = preg_replace($regexEmail, '<a href="mailto:\\1' . $emailSubject . '">\\1</a>', $val);
5730
                }