diff options
Diffstat (limited to 'src/cow_uri_template.erl')
-rw-r--r-- | src/cow_uri_template.erl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cow_uri_template.erl b/src/cow_uri_template.erl index eac784f..7aba1fc 100644 --- a/src/cow_uri_template.erl +++ b/src/cow_uri_template.erl @@ -310,6 +310,9 @@ urlencode_unreserved(<<C,R/bits>>, Acc) -> urlencode_unreserved(<<>>, Acc) -> Acc. +urlencode_reserved(<<$%,H,L,R/bits>>, Acc) + when ?IS_HEX(H), ?IS_HEX(L) -> + urlencode_reserved(R, <<Acc/binary,$%,H,L>>); urlencode_reserved(<<C,R/bits>>, Acc) when ?IS_URI_UNRESERVED(C) or ?IS_URI_GEN_DELIMS(C) or ?IS_URI_SUB_DELIMS(C) -> urlencode_reserved(R, <<Acc/binary,C>>); @@ -336,6 +339,7 @@ expand_uritemplate_test_() -> end ])), fun() -> + io:format("expected: ~0p", [Expected]), case Expected of false -> {'EXIT', _} = (catch expand(URITemplate, Vars)); |