Home » U++ Library support » U++ MT-multithreading and servers » Exclusion of underline chars in UrlEncode function
Exclusion of underline chars in UrlEncode function [message #25818] |
Sat, 13 March 2010 21:24 |
Sender Ghost
Messages: 301 Registered: November 2008
|
Senior Member |
|
|
No need to encode underline chars in UrlEncode function result.
File Web/util.cpp around 91 line:
String UrlEncode(String s)
{
const char *p = s, *e = s.End();
String out;
for(; p < e; p++)
{
const char *b = p;
while(p < e && (byte)*p > ' ' && (byte)*p < 127
&& (IsAlNum(*p) || *p == ',' || *p == '.' || *p == '-' || *p == '_'))
p++;
if(p > b)
out.Cat(b, int(p - b));
if(p >= e)
break;
if(*p == ' ')
out << '+';
else
out << '%' << hex_digits[(*p >> 4) & 15] << hex_digits[*p & 15];
}
return out;
}
[Updated on: Sat, 13 March 2010 21:40] Report message to a moderator
|
|
|
|
Goto Forum:
Current Time: Sat Apr 20 05:16:40 CEST 2024
Total time taken to generate the page: 0.04383 seconds
|