Fix URI decode issue for feedback module
This commit is contained in:
@@ -152,3 +152,26 @@ ax_query_feed(AxQuery query, const char *data, int32_t length)
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ax_query__decode(char *e_str)
|
||||
{
|
||||
char *p = e_str,
|
||||
hex[3] = {0,0,0};
|
||||
do {
|
||||
switch(*e_str) {
|
||||
case '%':
|
||||
hex[0] = *(++e_str);
|
||||
hex[1] = *(++e_str);
|
||||
*p++ = (char)strtol(hex, NULL, 16);
|
||||
break;
|
||||
|
||||
case '+':
|
||||
*p++ = ' ';
|
||||
break;
|
||||
|
||||
default:
|
||||
*p++ = *e_str;
|
||||
}
|
||||
} while(*e_str++ != 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -51,4 +51,7 @@ AislStatus
|
||||
ax_query_feed(AxQuery query, const char *data, int32_t length);
|
||||
|
||||
|
||||
void
|
||||
ax_query__decode(char *e_str);
|
||||
|
||||
#endif /* !QUERY_H */
|
||||
|
||||
Reference in New Issue
Block a user