diff options
-rw-r--r-- | stagit-index.c | 4 | ||||
-rw-r--r-- | stagit.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/stagit-index.c b/stagit-index.c index 8a53463..087ae1e 100644 --- a/stagit-index.c +++ b/stagit-index.c @@ -38,8 +38,8 @@ percentencode(FILE *fp, const char *s, size_t len) for (i = 0; *s && i < len; s++, i++) { uc = *s; - /* NOTE: do not encode '/' for paths */ - if (uc < '/' || uc >= 127 || (uc >= ':' && uc <= '@') || + /* NOTE: do not encode '/' for paths or ",-." */ + if (uc < ',' || uc >= 127 || (uc >= ':' && uc <= '@') || uc == '[' || uc == ']') { putc('%', fp); putc(tab[(uc >> 4) & 0x0f], fp); @@ -369,8 +369,8 @@ percentencode(FILE *fp, const char *s, size_t len) for (i = 0; *s && i < len; s++, i++) { uc = *s; - /* NOTE: do not encode '/' for paths */ - if (uc < '/' || uc >= 127 || (uc >= ':' && uc <= '@') || + /* NOTE: do not encode '/' for paths or ",-." */ + if (uc < ',' || uc >= 127 || (uc >= ':' && uc <= '@') || uc == '[' || uc == ']') { putc('%', fp); putc(tab[(uc >> 4) & 0x0f], fp); |