|
a/src/utils/pathut.cpp |
|
b/src/utils/pathut.cpp |
|
... |
|
... |
460 |
string url_encode(const string& url, string::size_type offs)
|
460 |
string url_encode(const string& url, string::size_type offs)
|
461 |
{
|
461 |
{
|
462 |
string out = url.substr(0, offs);
|
462 |
string out = url.substr(0, offs);
|
463 |
const char *cp = url.c_str();
|
463 |
const char *cp = url.c_str();
|
464 |
for (string::size_type i = offs; i < url.size(); i++) {
|
464 |
for (string::size_type i = offs; i < url.size(); i++) {
|
465 |
int c;
|
465 |
unsigned int c;
|
466 |
const char *h = "0123456789ABCDEF";
|
466 |
const char *h = "0123456789ABCDEF";
|
467 |
c = cp[i];
|
467 |
c = cp[i];
|
468 |
if (c <= 0x20 ||
|
468 |
if (c <= 0x20 ||
|
469 |
c >= 0x7f ||
|
469 |
c >= 0x7f ||
|
470 |
c == '"' ||
|
470 |
c == '"' ||
|