git: 9front

Download patch

ref: c409dc9456e66583e887d98e87b8572f580ac128
parent: 1bae6319deb7c0cd0b7a9835686147fa6558bbe5
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Thu Apr 3 05:44:48 EDT 2014

webfs: do not unescape escape

--- a/sys/src/cmd/webfs/url.c
+++ b/sys/src/cmd/webfs/url.c
@@ -31,7 +31,7 @@
 	for(r=w=s; x = *r; r++){
 		if(x == '%' && isxdigit(r[1]) && isxdigit(r[2])){
 			x = (dhex(r[1])<<4)|dhex(r[2]);
-			if(x == 0 || (x > 0x1F && x < 0x7F && strchr(spec, x))){
+			if(x == 0 || x == '%' || (x > 0x1F && x < 0x7F && strchr(spec, x))){
 				*w++ = '%';
 				*w++ = toupper(r[1]);
 				*w++ = toupper(r[2]);
--