mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
nhttpd: skip doubles decode on channlename, revert 42b69a8a5e
This commit is contained in:
@@ -203,12 +203,9 @@ std::string decodeString(std::string encodedString) {
|
|||||||
iStr = strtoul(hex, NULL, 16); /* convert to Hex char */
|
iStr = strtoul(hex, NULL, 16); /* convert to Hex char */
|
||||||
result += (char) iStr;
|
result += (char) iStr;
|
||||||
count += 3;
|
count += 3;
|
||||||
#if 0
|
|
||||||
//why decode '+' to ' ' ?
|
|
||||||
} else if (string[count] == '+') {
|
} else if (string[count] == '+') {
|
||||||
result += ' ';
|
result += ' ';
|
||||||
count++;
|
count++;
|
||||||
#endif
|
|
||||||
} else {
|
} else {
|
||||||
result += string[count];
|
result += string[count];
|
||||||
count++;
|
count++;
|
||||||
|
@@ -161,7 +161,11 @@ bool CWebserverRequest::ParseParams(std::string param_string) {
|
|||||||
if (!ySplitStringExact(param_string, "&", param, param_string))
|
if (!ySplitStringExact(param_string, "&", param, param_string))
|
||||||
ende = true;
|
ende = true;
|
||||||
if (ySplitStringExact(param, "=", name, value)) {
|
if (ySplitStringExact(param, "=", name, value)) {
|
||||||
|
if("channelname" == name){//skip doubles decode on channlename
|
||||||
|
value = trim((value));
|
||||||
|
}else{
|
||||||
value = trim(decodeString(value));
|
value = trim(decodeString(value));
|
||||||
|
}
|
||||||
if (ParameterList[name].empty())
|
if (ParameterList[name].empty())
|
||||||
ParameterList[name] = value;
|
ParameterList[name] = value;
|
||||||
else {
|
else {
|
||||||
|
Reference in New Issue
Block a user