-
Notifications
You must be signed in to change notification settings - Fork 526
Open
Description
Redcarpet seems to automatically URI encode the href for links. That’s fine in most cases except when linking to text fragments, where the tilde must not be encoded.
Current behavior:
'[foo](https://example.com#:~:text=bar)'
# => href: 'https://example.com#:%7E:text=bar'
# ^
Expected behavior:
'[foo](https://example.com#:~:text=bar)'
# => href: 'https://example.com#:~:text=bar'
# ^
As a workaround, I use a heuristic for post processing:
def postprocess text
text.gsub('#:%7E:text=', '#:~:text=')
end
Metadata
Metadata
Assignees
Labels
No labels