diff --git a/application/common/ArticleParserService.php b/application/common/ArticleParserService.php index d03cea0a..fd3dfc16 100644 --- a/application/common/ArticleParserService.php +++ b/application/common/ArticleParserService.php @@ -776,13 +776,13 @@ class ArticleParserService } //处理超链接(优先提取链接目标,可能是邮箱) - // if ($element instanceof \PhpOffice\PhpWord\Element\Link) { - // $target = $element->getTarget(); - // if (strpos($target, 'mailto:') === 0) { - // $text .= str_replace('mailto:', '', $target) . ' '; // 剥离mailto:前缀 - // } - // $text .= $element->getText() . ' '; - // } + if ($element instanceof \PhpOffice\PhpWord\Element\Link) { + $target = $element->getTarget(); + if (strpos($target, 'mailto:') === 0) { + $text .= str_replace('mailto:', '', $target) . ' '; // 剥离mailto:前缀 + } + $text .= $element->getText() . ' '; + } //处理字段和注释(可能包含隐藏邮箱) if ($element instanceof \PhpOffice\PhpWord\Element\Field) {