WBE update

Fixed some things that made the site not work. This is not the final version, just for the demo.
This commit is contained in:
TeunBugwood
2023-12-11 13:31:46 +01:00
parent ec09cb9625
commit dd176256bb

View File

@@ -243,23 +243,16 @@ static void wbe_decoding_url(const char* encoded, char* decoded) {
// If we encounter a %xx, decode it to ascii
if ((encoded[i] == '%') && (i + 2 < encoded_length)) {
/*
// Decode %xx
hex_val = (uint32_t)strtoul(&encoded[i + 1], &endptr, 16);
// Check for conversion errors
if (endptr == &encoded[i + 1] || *endptr != '\0') {
strcpy(decoded, "");
LOG_DEBUG("WBE", "URL text conversion error");
//return;
}
decoded[decoded_index++] = (char)hex_val;
*/
// Decode %xx
sscanf(&encoded[i + 1], "%2x", &hex_val);
decoded[decoded_index++] = (char)hex_val;
// Skip 2 characters
i += 2;