aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/uri_string.erl
diff options
context:
space:
mode:
authorPéter Dimitrov <[email protected]>2017-10-23 12:02:16 +0200
committerPéter Dimitrov <[email protected]>2017-10-24 09:17:24 +0200
commitda11b15aef87f392a807b4756bf285160e15a194 (patch)
tree56d5179ef9316f10268824ef1ab6044ec617564d /lib/stdlib/src/uri_string.erl
parentb439d19d38479d6264d906dd926a168c9c514da3 (diff)
downloadotp-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;" - amp: "&" - semicolon: ";"
Diffstat (limited to 'lib/stdlib/src/uri_string.erl')
-rw-r--r--lib/stdlib/src/uri_string.erl4
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) ->
"&amp;";
get_separator([{separator, amp}], _Acc) ->
+ "&";
+get_separator([{separator, escaped_amp}], _Acc) ->
"&amp;";
get_separator([{separator, semicolon}], _Acc) ->
";".
@@ -1901,6 +1903,8 @@ dissect_query_value([], Acc, Key, Value) ->
dissect_query_separator_amp("&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}).