~ecs/public-inbox

shorten escape v3 APPLIED

Evan Johnston: 1
 shorten escape

 1 files changed, 1 insertions(+), 4 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.d2evs.net/~ecs/public-inbox/patches/18/mbox | git am -3
Learn more about email & git

[PATCH v3] shorten escape Export this patch

---
 bin/urlfilter | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/bin/urlfilter b/bin/urlfilter
index 2ba145b..a85a146 100755
--- a/bin/urlfilter
@@ -11,10 +11,7 @@ function escape(str, c, len, res) {
	res = ""
	for (i = 1; i <= len; i++) {
		c = substr(str, i, 1);
		if (c ~ /[0-9A-Za-z]/)
			res = res c
		else
			res = res "%" sprintf("%02X", ord[c])
		res = res (c ~ /[0-9A-Za-z]/ ? c : "%" sprintf("%02X", ord[c]))
	}
	return res
}
-- 
2.37.1
Thanks!

To git@git.d2evs.net:~ecs/dotfiles
   45fb65c..8b25e78  master -> master