Skip to content

Wrong percent-encoding of unreserved characters #311

@DamienCassou

Description

@DamienCassou

Currently, Markdown percent-encodes unreserved characters. For example, this markdown expression:

[Pillar](http://www.smalltalkhub.com/#!/~Pier/Pillar)

generates

<a href="http://www.smalltalkhub.com/#!/%7EPier/Pillar">Pillar</a>

As you can see, the ~ has been percent-encoded to %7E. Even if this works fine on at least Firefox, this won't work on Chrome:

Click me to verify (works on Firefox 29, does not work on Chromium 34.0.1847.116).

The Percent-encoding page on Wikipedia explains that

For maximum interoperability, URI producers are discouraged from percent-encoding unreserved characters.

On the contrary, the markdown 1.0.1 command-line utility produces the expected, non percent-encoded, HTML:

<a href="http://www.smalltalkhub.com/#!/~Pier/Pillar">Pillar</a>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions