diff options
author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2017-12-24 13:05:47 +0100 |
---|---|---|
committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2017-12-24 13:05:47 +0100 |
commit | 1dff8155ac38dc37efab4b023f220926e5410e05 (patch) | |
tree | ab44dd9826ad8fca8d286f0325054a2fc9a7d715 | |
parent | b232db436b7b9343c336ef941c47cf8b107d1f7e (diff) |
sfeed_web: print relative url now directly if no base url specified
-rw-r--r-- | sfeed_web.1 | 6 | ||||
-rw-r--r-- | sfeed_web.c | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/sfeed_web.1 b/sfeed_web.1 index 145e0c8..646aa24 100644 --- a/sfeed_web.1 +++ b/sfeed_web.1 @@ -1,4 +1,4 @@ -.Dd December 25, 2014 +.Dd December 13, 2017 .Dt SFEED_WEB 1 .Os .Sh NAME @@ -20,14 +20,14 @@ Optional base url to use for found feed urls that are relative. url<TAB>content\-type<newline> .Bl -tag -width Ds .It url -Found absolute url. +Found relative or absolute url. If the url is relative and the .Ar baseurl option is specified then the url is made absolute. If the url is relative and no .Ar baseurl -option is specified it is empty. +option is specified then it is printed as is. .It content\-type Usually application/atom+xml or application/rss+xml. .El diff --git a/sfeed_web.c b/sfeed_web.c index 525bd84..a3ced63 100644 --- a/sfeed_web.c +++ b/sfeed_web.c @@ -46,6 +46,8 @@ xmltagstartparsed(XMLParser *p, const char *tag, size_t taglen, int isshort) if (absuri(abslink, sizeof(abslink), feedlink, basehref) != -1) fputs(abslink, stdout); + else + fputs(feedlink, stdout); fputc('\t', stdout); printfeedtype(feedtype, stdout); putchar('\n'); |