Code Duplication    Length = 3-3 lines in 2 locations

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

@@ 5743-5745 (lines=3) @@
5740
            if (is_array($val)) {
5741
                foreach ($val as $key2 => $val2) {
5742
                    $val2 = $this->parseText($val2, $ph);
5743
                    if (preg_match($regexUrl, $val2, $url)) {
5744
                        $val2 = preg_replace($regexUrl, "<a href=\"{$url[0]}\" target=\"_blank\">{$url[0]}</a> ", $val2);
5745
                    }
5746
                    if (preg_match($regexEmail, $val2, $url)) {
5747
                        $val2 = preg_replace($regexEmail, '<a href="mailto:\\1' . $emailSubject . '">\\1</a>', $val2);
5748
                    }
@@ 5753-5755 (lines=3) @@
5750
                }
5751
            } else {
5752
                $val = $this->parseText($val, $ph);
5753
                if (preg_match($regexUrl, $val, $url)) {
5754
                    $val = preg_replace($regexUrl, "<a href=\"{$url[0]}\" target=\"_blank\">{$url[0]}</a> ", $val);
5755
                }
5756
                if (preg_match($regexEmail, $val, $url)) {
5757
                    $val = preg_replace($regexEmail, '<a href="mailto:\\1' . $emailSubject . '">\\1</a>', $val);
5758
                }