Skip to content

Commit

Permalink
Fix #289.
Browse files Browse the repository at this point in the history
A link destination can't start with `<` unless it is
an angle-bracket link that also ends with `>`.

(If your URL really starts with `<`, URL-escape it.)
  • Loading branch information
jgm committed Mar 26, 2019
1 parent e1ad16f commit 61fd7f8
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/inlines.c
Original file line number Diff line number Diff line change
Expand Up @@ -967,13 +967,10 @@ static bufsize_t manual_scan_link_url(cmark_chunk *input, bufsize_t offset,
} else if (input->data[i] == '\\')
i += 2;
else if (input->data[i] == '\n' || input->data[i] == '<')
return manual_scan_link_url_2(input, offset, output);
return -1;
else
++i;
}
if (i >= input->len) {
return manual_scan_link_url_2(input, offset, output);
}
} else {
return manual_scan_link_url_2(input, offset, output);
}
Expand Down

0 comments on commit 61fd7f8

Please sign in to comment.