Code Duplication    Length = 3-3 lines in 2 locations

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

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