summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-09-12 10:31:34 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-09-12 10:31:34 -0400
commitc4193199db3ebf94e766aa8749b7b9482fd25169 (patch)
tree7635716fbecf152b55f40adb6927e46312feeb05
parent4d9fd106dfcd09caedacfbd14f4c76597cc4c5a4 (diff)
Debugging new string urlification
-rw-r--r--lib/js/urweb.js2
-rw-r--r--src/c/urweb.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/js/urweb.js b/lib/js/urweb.js
index 7349d2bf..19d549c2 100644
--- a/lib/js/urweb.js
+++ b/lib/js/urweb.js
@@ -473,6 +473,8 @@ function uf(s) {
function uu(s) {
if (s.length > 0 && s[0] == '_')
s = s.substring(1);
+ else if (s.length >= 3 && s[0] == '%' && s[1] == '5' && (s[2] == 'f' || s[2] == 'F'))
+ s = s.substring(3);
return unescape(s.replace(new RegExp ("\\+", "g"), " "));
}
diff --git a/src/c/urweb.c b/src/c/urweb.c
index d5005af2..21e50893 100644
--- a/src/c/urweb.c
+++ b/src/c/urweb.c
@@ -1625,7 +1625,7 @@ uw_Basis_time uw_Basis_unurlifyTime(uw_context ctx, char **s) {
}
static uw_Basis_string uw_unurlifyString_to(uw_context ctx, char *r, char *s) {
- char *s1, *s2;
+ char *s1, *s2 = s;
int n;
if (*s2 == '_')
@@ -1633,7 +1633,7 @@ static uw_Basis_string uw_unurlifyString_to(uw_context ctx, char *r, char *s) {
else if (s2[0] == '%' && s2[1] == '5' && (s2[2] == 'f' || s2[2] == 'F'))
s2 += 3;
- for (s1 = r, s2 = s; *s2; ++s1, ++s2) {
+ for (s1 = r; *s2; ++s1, ++s2) {
char c = *s2;
switch (c) {