youtube/gopher: escape some fields - frontends - front-ends for some sites (experiment)
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit db05879864829ecfa84f66cedde69b549788d507
 (DIR) parent 7385c0b104dea41686519ed734825da88ca2fb32
 (HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
       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(-)
       ---
 (DIR) 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->id, host, port);
       +                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->channelid, host, port);
       +                        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, host, port);
       +                        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);