24

html代码元标记描述,

它是动态生成的,我们在描述部分有引号,搜索引擎没有阅读所有内容。

它显示直到搜索结果中的引号开始

如何处理?

谢谢

4

2 回答 2

43

您需要使用HTML 字符引用转义引号:

<meta name="description" content="&quot;quoted content&quot;">

这里的描述是"quoted content"

于 2009-07-16T11:58:23.100 回答
1

在 PHP 中使用strip_tages+str_replace('"',"&quot")归档

<meta name="description" content="&quot;quoted content&quot;">

于 2019-05-24T00:37:25.323 回答