Skip to content

Commit d3fa7db

Browse files
author
ppom
committed
Remove url-encoded surrounding quotes to URL parameters
Fix sqlpage#879
1 parent fbe897a commit d3fa7db

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/webserver/database/sqlpage_functions/url_parameter_deserializer.rs

+8-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,14 @@ impl<'de> Deserialize<'de> for URLParameters {
5959
out.encode_and_push(&key);
6060
out.0.push_str("[]");
6161
out.0.push('=');
62-
out.encode_and_push(&val.to_string());
62+
63+
let val = val.to_string();
64+
// Remove any surrounding quotes added by serde_json
65+
out.encode_and_push(if val.starts_with("\"") && val.ends_with("\"") {
66+
&val[1..val.len()-1]
67+
} else {
68+
&val
69+
});
6370
}
6471
} else {
6572
out.push_kv(&key, value);

0 commit comments

Comments
 (0)