From eecc4d2ea8564c97aae16a775345974a50002b40 Mon Sep 17 00:00:00 2001 From: Uriel Date: Thu, 11 Dec 2008 21:38:31 +0000 Subject: [PATCH] Fix and simplify code that generates rss/atom urls. Now it handles urls in / properly. --- bin/werc.rc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/bin/werc.rc b/bin/werc.rc index 00c7599..b3804d0 100755 --- a/bin/werc.rc +++ b/bin/werc.rc @@ -205,12 +205,10 @@ fn select_handler { if (~ $#blogDirs 0) blogDirs = `{basename -d $body} - u=`{cleanname `{basename -d $uri}} - rssuri=$baseuri^$"u^/index.rss - atomuri=$baseuri^$"u^/index.atom + u=`{cleanname $baseuri^`{basename -d '/'^$uri}|sed 's,:/,://,'} # Sed recovers '/' in 'http:/' stripped by cleanname extraHeaders=$"extraHeaders ^ \ - ' - + ' + ' set_handler tpl_handler lib/feeds/html.tpl