Skip to content

Commit ea2a07d

Browse files
author
Ashe Connor
authored
~ should not be escaped in href (#110)
* test * fix: do not percent-encode ~
1 parent f649003 commit ea2a07d

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/houdini_href_e.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
/*
88
* The following characters will not be escaped:
99
*
10-
* -_.+!*'(),%#@?=;:/,+&$ alphanum
10+
* -_.+!*'(),%#@?=;:/,+&$~ alphanum
1111
*
1212
* Note that this character set is the addition of:
1313
*
@@ -35,7 +35,7 @@ static const char HREF_SAFE[] = {
3535
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3636
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1,
3737
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
38-
1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
38+
1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3939
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4040
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4141
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

test/regression.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,3 +169,11 @@ This ~text~~~~ is ~~~~curious~.
169169
.
170170
<p>This <del>text</del> is <del>curious</del>.</p>
171171
````````````````````````````````
172+
173+
`~` should not be escaped in href — https://github.com/github/markup/issues/311
174+
175+
```````````````````````````````` example
176+
[x](http://members.aon.at/~nkehrer/ibm_5110/emu5110.html)
177+
.
178+
<p><a href="http://members.aon.at/~nkehrer/ibm_5110/emu5110.html">x</a></p>
179+
````````````````````````````````

0 commit comments

Comments
 (0)