diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2011-01-07 18:23:52 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2011-01-07 18:23:52 +0000 |
commit | 0e2cdbd5f7e28470c436a3b6f18dfddecb159f8e (patch) | |
tree | 0d953494dfa5f2bfff3e9cf7a9de17fb1ce40d9d | |
parent | b4f3b4ba10fda9a1a4b42b2567ca145602eba197 (diff) |
Oops, missed the actual decoding part.
(closes issue #18046)
Reported by: wdoekes
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@301008 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | funcs/func_curl.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/funcs/func_curl.c b/funcs/func_curl.c index 3f314fd3f..0795944ca 100644 --- a/funcs/func_curl.c +++ b/funcs/func_curl.c @@ -654,6 +654,22 @@ static int acf_curl_helper(struct ast_channel *chan, const char *cmd, char *info if (!piece) { piece = ""; } + /* Do this before the decode, because if something has encoded + * a literal plus-sign, we don't want to translate that to a + * space. */ + if (hashcompat == HASHCOMPAT_LEGACY) { + int i; + for (i = 0; name[i]; i++) { + if (name[i] == '+') { + name[i] = ' '; + } + } + for (i = 0; piece[i]; i++) { + if (piece[i] == '+') { + piece[i] = ' '; + } + } + } ast_uri_decode(piece); ast_uri_decode(name); ast_str_append(&fields, 0, "%s%s", rowcount ? "," : "", name); |