| 671 | } |
| 672 | |
| 673 | std::string urlDecode(const std::string &urlEncoded) { |
| 674 | std::string res; |
| 675 | if (!urlEncoded.empty()) { |
| 676 | char *decoded = evhttp_uridecode(urlEncoded.c_str(), false, nullptr); |
| 677 | if (decoded) { |
| 678 | res = std::string(decoded); |
| 679 | free(decoded); |
| 680 | } |
| 681 | } |
| 682 | return res; |
| 683 | } |
no test coverage detected