Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

do not match apple-icon in rel matcher #93

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

klui
Copy link

@klui klui commented Nov 22, 2017

The previous matcher to find the link-element did look for everything containing the word 'icon'. Also apple's <link rel="apple-touch-icon" ...> was matched and got removed, or used as faviconTag (depending on the link elements' order).
The new matcher does not allow word 'icon' starting with hyphen anymore.

@@ -49,7 +49,7 @@
var links = document.getElementsByTagName('link');

for(var i=0, len=links.length; i < len; i++) {
if ((links[i].getAttribute('rel') || '').match(/\bicon\b/i)) {
if ((links[i].getAttribute('rel') || '').match(/\b(^| )icon\b/i)) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

\b becomes useless then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants