admin管理员组文章数量:1130349
I checked the HTML validator. But, the message is the following.
Quote " in attribute name. Probable cause: Matching quote missing somewhere earlier.
The meta description is automatic from the content. So, if the content includes the quotation, it is also included in meta descrption. I would like to strip the quotation.
Currently, I inserted the code in header.php as below.
$description = strip_shortcodes($description);
$description = wp_strip_all_tags($description);
What should I add?
I checked the HTML validator. But, the message is the following.
Quote " in attribute name. Probable cause: Matching quote missing somewhere earlier.
The meta description is automatic from the content. So, if the content includes the quotation, it is also included in meta descrption. I would like to strip the quotation.
Currently, I inserted the code in header.php as below.
$description = strip_shortcodes($description);
$description = wp_strip_all_tags($description);
What should I add?
Share Improve this question asked Oct 19, 2018 at 5:18 YoosYoos 13 bronze badges2 Answers
Reset to default 0Try to use Yoast SEO: https://it.wordpress/plugins/wordpress-seo/
It's the best plugin for SEO in WP and should be strips all "dangerous" chars
Probably, it works for HTML5 Validator.
$description = str_replace(array("\r\n","\r","\n"," ",'"',"'"),'',$description);
$description = strip_shortcodes($description);
$description = wp_strip_all_tags($description);
First quotation is removed, but second one is not removed, though.
I checked the HTML validator. But, the message is the following.
Quote " in attribute name. Probable cause: Matching quote missing somewhere earlier.
The meta description is automatic from the content. So, if the content includes the quotation, it is also included in meta descrption. I would like to strip the quotation.
Currently, I inserted the code in header.php as below.
$description = strip_shortcodes($description);
$description = wp_strip_all_tags($description);
What should I add?
I checked the HTML validator. But, the message is the following.
Quote " in attribute name. Probable cause: Matching quote missing somewhere earlier.
The meta description is automatic from the content. So, if the content includes the quotation, it is also included in meta descrption. I would like to strip the quotation.
Currently, I inserted the code in header.php as below.
$description = strip_shortcodes($description);
$description = wp_strip_all_tags($description);
What should I add?
Share Improve this question asked Oct 19, 2018 at 5:18 YoosYoos 13 bronze badges2 Answers
Reset to default 0Try to use Yoast SEO: https://it.wordpress/plugins/wordpress-seo/
It's the best plugin for SEO in WP and should be strips all "dangerous" chars
Probably, it works for HTML5 Validator.
$description = str_replace(array("\r\n","\r","\n"," ",'"',"'"),'',$description);
$description = strip_shortcodes($description);
$description = wp_strip_all_tags($description);
First quotation is removed, but second one is not removed, though.
本文标签: descriptionHow strip the quotation from the meta descrption
版权声明:本文标题:description - How strip the quotation from the meta descrption? 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749249001a2339375.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论