diff options
author | the little girl <yui@blekksprut.net> | 2014-04-14 21:53:09 +0200 |
---|---|---|
committer | the little girl <yui@blekksprut.net> | 2014-04-14 21:53:09 +0200 |
commit | 4cf2bb5092906bd9e4e689999c1729e37b4abd18 (patch) | |
tree | 30539f838ef6a800473d3fab6f8063b4e1ef9f52 | |
parent | 1d0185b3d20a3c530597f5de03059a161107aedc (diff) | |
download | ukulele-4cf2bb5092906bd9e4e689999c1729e37b4abd18.tar.xz |
mulighet for absolutte linker nederst
-rw-r--r-- | wiki.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -50,8 +50,12 @@ void head(char *page, char *link, char *what) { void foot(int file) { printf("<hr>\n"); printf("<p>"); - for(int i = 0; *links[i]; i++) - printf("<a href='%s/%s'>%s</a> ", script, links[i][1], links[i][0]); + for(int i = 0; *links[i]; i++) { + if(*links[i][1] == '/' || strstr(links[i][1], "://")) + printf("<a href='%s'>%s</a> ", links[i][1], links[i][0]); + else + printf("<a href='%s/%s'>%s</a> ", script, links[i][1], links[i][0]); + } if(!file) return; printf("<span style='float: right'>"); printf("%s ", id); |