diff options
author | 2010-02-25 15:08:52 -0500 | |
---|---|---|
committer | 2010-02-25 15:08:52 -0500 | |
commit | db1a486aaf3470c9c2cb30529867ae96d28f4ce2 (patch) | |
tree | 7288c5d93e093a7862292e7e4277c075a15e84dd | |
parent | 118054678805f2498b8eac0d4685d6977f4493ae (diff) |
Normalize URLs to deal with page names that contain apostrophes
-rw-r--r-- | src/c/request.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/c/request.c b/src/c/request.c index 7e53f716..2ca65691 100644 --- a/src/c/request.c +++ b/src/c/request.c @@ -128,6 +128,14 @@ request_result uw_request(uw_request_context rc, uw_context ctx, size_t boundary_len = 0; char *inputs; const char *prefix = uw_get_url_prefix(ctx); + char *s; + + for (s = path; *s; ++s) { + if (s[0] == '%' && s[1] == '2' && s[2] == '7') { + s[0] = '\''; + memmove(s+1, s+3, strlen(s+3)+1); + } + } uw_set_currentUrl(ctx, path); |