Skip to content

Commit

Permalink
~ should not be escaped in href (#110)
Browse files Browse the repository at this point in the history
* test

* fix: do not percent-encode ~
  • Loading branch information
Ashe Connor committed Sep 5, 2018
1 parent f649003 commit ea2a07d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/houdini_href_e.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/*
* The following characters will not be escaped:
*
* -_.+!*'(),%#@?=;:/,+&$ alphanum
* -_.+!*'(),%#@?=;:/,+&$~ alphanum
*
* Note that this character set is the addition of:
*
Expand Down Expand Up @@ -35,7 +35,7 @@ static const char HREF_SAFE[] = {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1,
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Expand Down
8 changes: 8 additions & 0 deletions test/regression.txt
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,11 @@ This ~text~~~~ is ~~~~curious~.
.
<p>This <del>text</del> is <del>curious</del>.</p>
````````````````````````````````

`~` should not be escaped in href — https://github.com/github/markup/issues/311

```````````````````````````````` example
[x](http://members.aon.at/~nkehrer/ibm_5110/emu5110.html)
.
<p><a href="http://members.aon.at/~nkehrer/ibm_5110/emu5110.html">x</a></p>
````````````````````````````````
Expand Down

0 comments on commit ea2a07d

Please sign in to comment.