From faf7ab378518b6ad8792603a41c641cb13b2ff83 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 26 Mar 2019 12:20:15 -0700 Subject: Fix #289. 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.) --- src/inlines.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/inlines.c b/src/inlines.c index 6e92aff..6f93fd4 100644 --- a/src/inlines.c +++ b/src/inlines.c @@ -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); } -- cgit v1.2.3