diff --git a/src/mod_matrix_gw.erl b/src/mod_matrix_gw.erl index 929cdc47748..a1e3905a3a2 100644 --- a/src/mod_matrix_gw.erl +++ b/src/mod_matrix_gw.erl @@ -743,7 +743,7 @@ sign_json(Host, JSON) -> send_request(Host, Method, MatrixServer, Path, Query, JSON, HTTPOptions, Options) -> URI1 = iolist_to_binary( - lists:map(fun(P) -> [$/, http_uri:encode(P)] end, Path)), + lists:map(fun(P) -> [$/, uri_string:quote(P)] end, Path)), URI = case Query of [] -> URI1; @@ -751,7 +751,7 @@ send_request(Host, Method, MatrixServer, Path, Query, JSON, URI2 = str:join( lists:map( fun({K, V}) -> - [http_uri:encode(K), $=, http_uri:encode(V)] + [uri_string:quote(K), $=, uri_string:quote(V)] end, Query), $&), <> end,