From 4cf2bb5092906bd9e4e689999c1729e37b4abd18 Mon Sep 17 00:00:00 2001 From: the little girl Date: Mon, 14 Apr 2014 21:53:09 +0200 Subject: mulighet for absolutte linker nederst --- wiki.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/wiki.c b/wiki.c index e764f2a..5f3af7e 100644 --- a/wiki.c +++ b/wiki.c @@ -50,8 +50,12 @@ void head(char *page, char *link, char *what) { void foot(int file) { printf("
\n"); printf("

"); - for(int i = 0; *links[i]; i++) - printf("%s ", script, links[i][1], links[i][0]); + for(int i = 0; *links[i]; i++) { + if(*links[i][1] == '/' || strstr(links[i][1], "://")) + printf("%s ", links[i][1], links[i][0]); + else + printf("%s ", script, links[i][1], links[i][0]); + } if(!file) return; printf(""); printf("%s ", id); -- cgit v1.0