Skip to content
Discussion options

You must be logged in to vote

Definely something with Pandoc which HTML escape the characters when parsing the link

echo '[test](http://[fd04::123]:8080)' | pandoc -f markdown -t native                            
[ Para
    [ Link
        ( "" , [] , [] )
        [ Str "test" ]
        ( "http://%5Bfd04::123%5D:8080" , "" )
    ]
]

They do escape at reading time with usual URI escaping
https://github.com/jgm/pandoc/blob/e4ac26d255ad8748c01301b3319975de39a8f43f/src/Text/Pandoc/URI.hs#L29-L32

Note that JS function also does it

> encodeURI('http://[fd04::123]:8080')
'http://%5Bfd04::123%5D:8080'

So I think those URL are quite specific, right ?

It seems it requires a specific handling for ipv6 following recent RFC3986
h…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@mcanouil
Comment options

@cderv
Comment options

Answer selected by produnis
@produnis
Comment options

@cscheid
Comment options

@mcanouil
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream Bug is in upstream library pandoc
4 participants