diff options
author | Péter Dimitrov <[email protected]> | 2017-10-23 12:02:16 +0200 |
---|---|---|
committer | Péter Dimitrov <[email protected]> | 2017-10-24 09:17:24 +0200 |
commit | da11b15aef87f392a807b4756bf285160e15a194 (patch) | |
tree | 56d5179ef9316f10268824ef1ab6044ec617564d /lib/stdlib/src/uri_string.erl | |
parent | b439d19d38479d6264d906dd926a168c9c514da3 (diff) | |
download | otp-da11b15aef87f392a807b4756bf285160e15a194.tar.gz otp-da11b15aef87f392a807b4756bf285160e15a194.tar.bz2 otp-da11b15aef87f392a807b4756bf285160e15a194.zip |
stdlib: Update supported separators (query string)
Update list of supported separators:
- escaped_amp (default): "&"
- amp: "&"
- semicolon: ";"
Diffstat (limited to 'lib/stdlib/src/uri_string.erl')
-rw-r--r-- | lib/stdlib/src/uri_string.erl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/stdlib/src/uri_string.erl b/lib/stdlib/src/uri_string.erl index 8723d3f183..a4fd9c66f4 100644 --- a/lib/stdlib/src/uri_string.erl +++ b/lib/stdlib/src/uri_string.erl @@ -1806,6 +1806,8 @@ get_separator(_, Acc) when length(Acc) =:= 0 -> get_separator([], _Acc) -> "&"; get_separator([{separator, amp}], _Acc) -> + "&"; +get_separator([{separator, escaped_amp}], _Acc) -> "&"; get_separator([{separator, semicolon}], _Acc) -> ";". @@ -1901,6 +1903,8 @@ dissect_query_value([], Acc, Key, Value) -> dissect_query_separator_amp("&" ++ T, Acc, Key, Value) -> dissect_query_key(T, Acc, Key, Value); +dissect_query_separator_amp("&" ++ T, Acc, Key, Value) -> + dissect_query_key(T, Acc, Key, Value); dissect_query_separator_amp(L, _, _, _) -> throw({error, invalid_separator, L}). |