Skip to content
This repository has been archived by the owner on Feb 24, 2022. It is now read-only.

defaultValue for favicon should be "/favicon.ico" rather than "favicon.ico" #120

Closed
darinwf opened this issue Aug 30, 2021 · 0 comments
Closed
Labels
ARCHIVED CLOSED at time of archiving

Comments

@darinwf
Copy link

darinwf commented Aug 30, 2021

According to the HTML spec (https://html.spec.whatwg.org/#rel-icon), the fallback favicon should be "/favicon.ico" resolved against the document URL.

However, parser.js falls back to resolving "favicon.ico" against the document URL, which can result in some favicon URLs that are unexpected.

The fix is pretty trivial:

--- parser.js	2021-08-30 13:01:51.000000000 -0700
+++ parser.js-new	2021-08-30 16:02:05.000000000 -0700
@@ -94,7 +94,7 @@
         }
       }
     ],
-    defaultValue: (context) => 'favicon.ico',
+    defaultValue: (context) => '/favicon.ico',
     processors: [
       (icon_url, context) => makeUrlAbsolute(context.url, icon_url)
     ]
@cknowles-admin cknowles-admin added the ARCHIVED CLOSED at time of archiving label Feb 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ARCHIVED CLOSED at time of archiving
Projects
None yet
Development

No branches or pull requests

2 participants