forked from JustinBeckwith/linkinator
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
The content attribute of a <meta> tag is assumed to be a URL if new URL(content) doesn't throw an error:
Lines 121 to 129 in 39ca01c
| // Only for <meta content=""> tags, only validate the url if | |
| // the content actually looks like a url | |
| if (tag === 'meta' && attributes.content) { | |
| try { | |
| new URL(attributes.content); | |
| } catch { | |
| return; | |
| } | |
| } |
However, this may be too lenient as it leads to values that are not meant to be URLs to be treated as URLs, like the following:
<meta name="description" content="Test: Hello">
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels