Parse %09 as a search string separator in initial URIs - sacc - sacc(omys), simple console gopher client HTML git clone git://bitreich.org/sacc/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/sacc/ DIR Log DIR Files DIR Refs DIR Tags DIR LICENSE --- DIR commit 7bd48fa9930dca90e24e17b78b451b014ae287e8 DIR parent aeb6afa41ddf42eeb865079c7d218a2cbdfe2ef3 HTML Author: Quentin Rameau <quinq@fifth.space> Date: Tue, 29 Oct 2019 00:02:02 +0100 Parse %09 as a search string separator in initial URIs Diffstat: M sacc.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) --- DIR diff --git a/sacc.c b/sacc.c @@ -922,12 +922,14 @@ moldentry(char *url) entry->type = gopherpath[0]; entry->username = entry->selector = ++gopherpath; if (entry->type == '7') { - for (; *p; ++p) { - if (*p == '\t') { - asprintf(&entry->tag, "%s", gopherpath); - *p = '\0'; - break; - } + p = gopherpath; + if (p = strstr(p, "%09")) { + memmove(p+1, p+3, strlen(p+3)+1); + *p = '\t'; + } + if (p = strchr(p, '\t')) { + asprintf(&entry->tag, "%s", gopherpath); + *p = '\0'; } } entry->host = host;