html2md icon indicating copy to clipboard operation
html2md copied to clipboard

Destinations in links with white-space should be enlosed in "<" and ">"

Open getreu opened this issue 1 year ago • 1 comments

Expected behavior

The destination can only contain spaces if it is enclosed in pointy brackets: Commonmark: Example 489

<p><a href="/my uri">link</a></p>
[link](</my uri>)

and the destination can be percent encoded:

<p><a href="/my%20uri">link</a></p>
[link](</my uri>)

For percent decoding you can use:

use percent_encoding::percent_decode_str;

from the crate percent-encoding. You can find a sample code here.

Current behavior

No pointy brackets are rendered when the destination has white-space.

getreu avatar Feb 06 '25 10:02 getreu