最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - While adding google font to my blog in blogger I got error in Header Section - Stack Overflow

programmeradmin2浏览0评论

Please help me solve the error displayed in the image below.

It says:

Error parsing XML, line 5, column 71: The reference to entity "display" must end with the ';' delimiter
<strike>
<head>
    <link href=";display=swap" rel="stylesheet"/>
</strike>

Please help me solve the error displayed in the image below.

It says:

Error parsing XML, line 5, column 71: The reference to entity "display" must end with the ';' delimiter
<strike>
<head>
    <link href="https://fonts.googleapis./css?family=Roboto&display=swap" rel="stylesheet"/>
</strike>

Share Improve this question edited Dec 17, 2019 at 6:32 Pingolin 3,4177 gold badges27 silver badges43 bronze badges asked Dec 17, 2019 at 6:14 user12550010user12550010
Add a ment  | 

3 Answers 3

Reset to default 9

You need to escape the ampersand & to &amp; in XML code.

<link href="https://fonts.googleapis./css?family=Roboto&amp;display=swap" rel="stylesheet"/>

just change & with &amp;
The problem will be solved

The html code will be like this:

<link href="https://fonts.googleapis./css?family=Roboto&amp;display=swap" rel="stylesheet"/>

For your kind attention, you can avoid display=swap. And I'll remend this one:

<link as='style' href='https://fonts.googleapis./css?family=Roboto' media='all' onload='this.onload=null;this.rel=&apos;stylesheet&apos;' rel='preload'/>
发布评论

评论列表(0)

  1. 暂无评论