RobertDober / earmark_parser

The Markdown to AST part of Earmark.
Apache License 2.0
68 stars 26 forks source link

Bad encoding of some href params in links #61

Closed RobertDober closed 3 years ago

RobertDober commented 3 years ago

This became apparent when testing with Elixir 1.13.0-rc.0 where URI.decode was improved :clap:

here is the problem

parsing <http://foo.bar.baz/%{foo}> yields

[
  {"p", [],
   [
     {"a", [{"href", "http://foo.bar.baz/%{foo}"}],
      ["http://foo.bar.baz/%{foo}"], %{}}
   ], %{}}
]

but should yield

...
{"a", [{"href", "http://foo.bar.baz/%25%7Bfoo%7D"}], ["http://foo.bar.baz/%{foo}"]
...