youtube/gopher: escape some fields - frontends - front-ends for some sites (exp… | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit db05879864829ecfa84f66cedde69b549788d507 | |
parent 7385c0b104dea41686519ed734825da88ca2fb32 | |
Author: Hiltjo Posthuma <[email protected]> | |
Date: Tue, 7 Mar 2023 19:27:07 +0100 | |
youtube/gopher: escape some fields | |
Diffstat: | |
M youtube/gopher.c | 15 +++++++++++---- | |
1 file changed, 11 insertions(+), 4 deletions(-) | |
--- | |
diff --git a/youtube/gopher.c b/youtube/gopher.c | |
@@ -127,17 +127,24 @@ render_search(struct search_response *r) | |
} | |
printf("\t%s\t%s\r\n", host, port); | |
- if (v->id[0]) | |
- printf("1Details\t%s?v=%s\t%s\t%s\r\n", requestpath, v… | |
+ if (v->id[0]) { | |
+ printf("1Details\t%s?v=", requestpath); | |
+ OUTLINK(v->id); | |
+ printf("\t%s\t%s\r\n", host, port); | |
+ } | |
if (v->channelid[0]) { | |
OUT("1"); | |
OUTTEXT(v->channeltitle); | |
- printf("\t%s?c=%s\t%s\t%s\r\n", requestpath, v->channe… | |
+ printf("\t%s?c=", requestpath); | |
+ OUTLINK(v->channelid); | |
+ printf("\t%s\t%s\r\n", host, port); | |
} else if (v->userid[0]) { | |
OUT("1"); | |
OUTTEXT(v->channeltitle); | |
- printf("\t%s?u=%s\t%s\t%s\r\n", requestpath, v->userid… | |
+ printf("\t%s?u=", requestpath); | |
+ OUTLINK(v->userid); | |
+ printf("\t%s\t%s\r\n", host, port); | |
} else if (v->channeltitle[0]) { | |
OUT("i"); | |
OUTTEXT(v->channeltitle); |