|
...
|
...
|
@@ -188,7 +188,7 @@ class TranslateLogic extends BaseLogic |
|
|
|
// $contentData[] = $trimmedString;
|
|
|
|
// }
|
|
|
|
$contentData = array_values($textContentArray);
|
|
|
|
$pattern = '/<meta\s+[^>]*name=[\'"](keywords|description)[\'"][^>]*content=[\'"]([^\'"]+)[\'"]>/i'; // 匹配 name 为 "keywords" 或 "description" 的 meta 标签的正则表达式
|
|
|
|
$pattern = '/<meta\s+([^>]*\s+)?name=[\'"](keywords|description)[\'"]([^>]*\s+)?content=[\'"]([^\'"]+)[\'"]([^>]*)?>/i'; // 匹配 name 为 "keywords" 或 "description" 的 meta 标签的正则表达式
|
|
|
|
$matches = array();
|
|
|
|
preg_match_all($pattern, $strippedContent, $matches);
|
|
|
|
$metaData = array();
|
...
|
...
|
|