Skip to content

Commit

Permalink
Fix #60956 (improve --page-requisites)
Browse files Browse the repository at this point in the history
* src/html_url.c (tag_handle_link): Check for "alternate stylesheet",
  "icon" and "manifest".
  • Loading branch information
WB authored and rockdaboot committed Aug 21, 2021
1 parent 7899e1d commit ebb9676
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/html-url.c
Original file line number Diff line number Diff line change
Expand Up @@ -529,8 +529,8 @@ tag_handle_link (int tagid _GL_UNUSED, struct taginfo *tag, struct map_context *
/* All <link href="..."> link references are external, except those
known not to be, such as style sheet and shortcut icon:
<link rel="stylesheet" href="...">
<link rel="shortcut icon" href="...">
<link rel="stylesheet" href="..."> or <link rel="alternate stylesheet" href="...">
<link rel="shortcut icon" href="..."> or <link rel="icon" href="...">
*/
if (href)
{
Expand All @@ -541,12 +541,16 @@ tag_handle_link (int tagid _GL_UNUSED, struct taginfo *tag, struct map_context *
char *rel = find_attr (tag, "rel", NULL);
if (rel)
{
if (0 == c_strcasecmp (rel, "stylesheet"))
if (0 == c_strcasecmp (rel, "stylesheet") || 0 == c_strcasecmp (rel, "alternate stylesheet"))
{
up->link_inline_p = 1;
up->link_expect_css = 1;
}
else if (0 == c_strcasecmp (rel, "shortcut icon"))
else if (0 == c_strcasecmp (rel, "shortcut icon") || 0 == c_strcasecmp (rel, "icon"))
{
up->link_inline_p = 1;
}
else if (0 == c_strcasecmp (rel, "manifest"))
{
up->link_inline_p = 1;
}
Expand Down

0 comments on commit ebb9676

Please sign in to comment.