Code Duplication    Length = 3-3 lines in 2 locations

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

@@ 5753-5755 (lines=3) @@
5750
            if (is_array($val)) {
5751
                foreach ($val as $key2 => $val2) {
5752
                    $val2 = $this->parseText($val2, $ph);
5753
                    if (preg_match($regexUrl, $val2, $url)) {
5754
                        $val2 = preg_replace($regexUrl, "<a href=\"{$url[0]}\" target=\"_blank\">{$url[0]}</a> ", $val2);
5755
                    }
5756
                    if (preg_match($regexEmail, $val2, $url)) {
5757
                        $val2 = preg_replace($regexEmail, '<a href="mailto:\\1' . $emailSubject . '">\\1</a>', $val2);
5758
                    }
@@ 5763-5765 (lines=3) @@
5760
                }
5761
            } else {
5762
                $val = $this->parseText($val, $ph);
5763
                if (preg_match($regexUrl, $val, $url)) {
5764
                    $val = preg_replace($regexUrl, "<a href=\"{$url[0]}\" target=\"_blank\">{$url[0]}</a> ", $val);
5765
                }
5766
                if (preg_match($regexEmail, $val, $url)) {
5767
                    $val = preg_replace($regexEmail, '<a href="mailto:\\1' . $emailSubject . '">\\1</a>', $val);
5768
                }