Skip to content

Commit faf7ab3

Browse files
committed
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.)
1 parent e3990d7 commit faf7ab3

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/inlines.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -967,13 +967,10 @@ static bufsize_t manual_scan_link_url(cmark_chunk *input, bufsize_t offset,
967967
} else if (input->data[i] == '\\')
968968
i += 2;
969969
else if (input->data[i] == '\n' || input->data[i] == '<')
970-
return manual_scan_link_url_2(input, offset, output);
970+
return -1;
971971
else
972972
++i;
973973
}
974-
if (i >= input->len) {
975-
return manual_scan_link_url_2(input, offset, output);
976-
}
977974
} else {
978975
return manual_scan_link_url_2(input, offset, output);
979976
}

0 commit comments

Comments
 (0)