I am validating my store in W3 validator and I am gettin some errors in this line:
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,700italic,300,700,400&subset=latin,latin-ext' rel='stylesheet' type='text/css'/>
The problem seem to lie in &subset= code.
The w3 validator returns:
An entity reference was found in the document, but there is no
reference by that name defined. Often this is caused by misspelling
the reference name, unencoded ampersands, or by leaving off the
trailing semicolon (;). The most common cause of this error is
unencoded ampersands in URLs as described by the WDG in “Ampersands in
URLs”.Entity references start with an ampersand (&) and end with a semicolon
(;). If you want to use a literal ampersand in your document you must
encode it as “&” (even inside URLs!). Be careful to end entity
references with a semicolon or your entity reference may get
interpreted in connection with the following text. Also keep in mind
that named entity references are case-sensitive; &Aelig; and æ
are different characters.If this error appears in some markup generated by PHP’s session
handling code, this article has explanations and solutions to your
problem.Note that in most documents, errors related to entity references will
trigger up to 5 separate messages from the Validator. Usually these
will all disappear when the original problem is fixed.
I have four questions:
- where is this line generated? I cant seem to find it.
- what is the correct syntax for it?
- is meta
name="keywords"tag obsolete? I think so, but even the newest magento version still auto generates it. Can it be removed? - i would like to add custom SEO stuff in header. What would be the correct location for it, since the header parses from multiple locations.
Thank you in advance.
You need to encode
&in links. See for example the question: Do I encode ampersands in <a href…>?So
&should become&(as long as you don’t want to reference a different entity).