Fix uri format to follow RFC 3986 (#2157)
This commit is contained in:
1 parent
55249e29be
commit
689a4e660b
2 files changed
+12
-12
No files matched your search
+1
-1
@@ -645,7 +645,7 @@ static jv f_format(jq_state *jq, jv input, jv fmt) {
|
||||
input = f_tostring(jq, input);
|
||||
|
||||
int unreserved[128] = {0};
|
||||
const char* p = CHARS_ALPHANUM "-_.!~*'()";
|
||||
const char* p = CHARS_ALPHANUM "-_.~";
|
||||
while (*p) unreserved[(int)*p++] = 1;
|
||||
|
||||
jv line = jv_string("");
|
||||
|
||||
+11
-11
@@ -61,17 +61,17 @@ null
|
||||
null
|
||||
"interpolation"
|
||||
|
||||
@text,@json,([1,.] | (@csv, @tsv)),@html,@uri,@sh,@base64,(@base64 | @base64d)
|
||||
"<>&'\"\t"
|
||||
"<>&'\"\t"
|
||||
"\"<>&'\\\"\\t\""
|
||||
"1,\"<>&'\"\"\t\""
|
||||
"1\t<>&'\"\\t"
|
||||
"<>&'"\t"
|
||||
"%3C%3E%26'%22%09"
|
||||
"'<>&'\\''\"\t'"
|
||||
"PD4mJyIJ"
|
||||
"<>&'\"\t"
|
||||
@text,@json,([1,.]|@csv,@tsv),@html,@uri,@sh,(@base64|.,@base64d)
|
||||
"!()<>&'\"\t"
|
||||
"!()<>&'\"\t"
|
||||
"\"!()<>&'\\\"\\t\""
|
||||
"1,\"!()<>&'\"\"\t\""
|
||||
"1\t!()<>&'\"\\t"
|
||||
"!()<>&'"\t"
|
||||
"%21%28%29%3C%3E%26%27%22%09"
|
||||
"'!()<>&'\\''\"\t'"
|
||||
"ISgpPD4mJyIJ"
|
||||
"!()<>&'\"\t"
|
||||
|
||||
# regression test for #436
|
||||
@base64
|
||||
|
||||
Reference in new issue
Block a user