Skip to content

Commit

Permalink
md_analyze_permissive_autolink: Allow '+' in URL paths
Browse files Browse the repository at this point in the history
Fixes mity#251.
  • Loading branch information
Kaffeine committed Aug 2, 2024
1 parent 46c9492 commit f25d6a0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ Fixes:
with ATX headers.

- [#251](https://github.com/mity/md4c/issues/251):
Fix handling of allowed non-alphanumeric characters in URL detection.
Fix handling of allowed non-alphanumeric characters in URL detection and
allow '+' in 'path' component.


## Version 0.5.2
Expand Down
2 changes: 1 addition & 1 deletion src/md4c.c
Original file line number Diff line number Diff line change
Expand Up @@ -3906,7 +3906,7 @@ md_analyze_permissive_autolink(MD_CTX* ctx, int mark_index)
const MD_CHAR optional_end_char;
} URL_MAP[] = {
{ _T('\0'), _T('.'), _T(".-_"), 2, _T('\0') }, /* host, mandatory */
{ _T('/'), _T('/'), _T("/.-_"), 0, _T('/') }, /* path */
{ _T('/'), _T('/'), _T("/.-+_"), 0, _T('/') }, /* path */
{ _T('?'), _T('&'), _T("&.-+_=()"), 1, _T('\0') }, /* query */
{ _T('#'), _T('\0'), _T(".-+_") , 1, _T('\0') } /* fragment */
};
Expand Down

0 comments on commit f25d6a0

Please sign in to comment.