问题
In the HTML code of my blogger template I am trying to add an external link to a CSS file hosted in Google drive.
I have made the CSS file public and created a direct download link:
https://drive.google.com/uc?export=download&id=0ByXCg9N1QXp8ZWdEWHlIUjMyRDQ
What I did next is that from the blogger admin panel I selected the HTML code of my template using:
Theme -> Edit HTML
and in the <head>
section I added the following line:
<link href='//drive.google.com/uc?export=download&id=0ByXCg9N1QXp8ZWdEWHlIUjMyRDQ'
rel='stylesheet' media='all' type='text/css'/>
When trying to do Save Theme I get the following error:
Error parsing XML, line 9, column 53: The reference to entity "id" must end with the ';' delimiter.
Apparently the XML parser of the theme code doesn't like the href
attribute value. How can I rewrite the url so that it is accepted by the XML parser?
回答1:
The problem is with the &
symbol in the link. You will need to replace it with &
to make the link be accepted by Blogger's XML parser -
<link href='//drive.google.com/uc?export=download&id=0ByXCg9N1QXp8ZWdEWHlIUjMyRDQ'
rel='stylesheet' media='all' type='text/css'/>
来源:https://stackoverflow.com/questions/43675506/add-external-css-file-to-blogger-template