Fix support for some non-standard subscription

Add Dockerfile for image auto update.
This commit is contained in:
Tindy X committed 2020-01-13 15:08:08 +08:00
1 parent 3a39977253
commit 4374a3e8bd
2 files changed
+26 -5

No files matched your search

+10 -5
View File
@@ -124,7 +124,7 @@ unsigned char FromHex(unsigned char x)
else if (x >= '0' && x <= '9')
y = x - '0';
else
assert(0);
y = x;
return y;
}
@@ -154,7 +154,7 @@ std::string UrlEncode(const std::string& str)
std::string UrlDecode(const std::string& str)
{
std::string strTemp = "";
std::string strTemp;
size_t length = str.length();
for (size_t i = 0; i < length; i++)
{
@@ -164,9 +164,14 @@ std::string UrlDecode(const std::string& str)
{
if(i + 2 >= length)
return strTemp;
unsigned char high = FromHex((unsigned char)str[++i]);
unsigned char low = FromHex((unsigned char)str[++i]);
strTemp += high * 16 + low;
if(isalnum(str[i + 1]) && isalnum(str[i + 2]))
{
unsigned char high = FromHex((unsigned char)str[++i]);
unsigned char low = FromHex((unsigned char)str[++i]);
strTemp += high * 16 + low;
}
else
strTemp += str[i];
}
else
strTemp += str[i];