Skip to content

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.


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.

3 participants