commit 501a05a44015a317637bd84ffaced7564f703710
parent fd15b18156c2068610a40f4a8a473c74ae61159b
Author: uriel@engel.se.cat-v.org <unknown>
Date: Sat, 15 Mar 2008 21:54:24 +0100
New (saner?) title format, and extra input sanity check.
Diffstat:
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/bin/controller.rc b/bin/controller.rc
@@ -1,7 +1,7 @@
#!/usr/local/plan9/bin/rc
path=(. ./bin $PLAN9/bin /bin/ /usr/bin)
-uri = `{echo -n $REQUEST_URI | sed 's/\?.*//; s/[^a-zA-Z0-9_+\-\/]//g'}
+uri = `{echo -n $REQUEST_URI | sed -e 's/\?.*//; s/[^a-zA-Z0-9_+\-\/]//g' -e '1q'}
ifs='/' {
args = `{echo -n $uri}
}
@@ -125,8 +125,9 @@ fn genbody {
. etc/initrc
if (! ~ $args '') {
- title=$args($#args)
- title=`{echo $title | sed 's/_/ /g' }
+ #title=$args($#args)
+ title=$args
+ title=`{echo $title | sed -e 's/ / - /g' -e 's/_/ /g' }
body=$uri
}
diff --git a/inc/headers.tpl b/inc/headers.tpl
@@ -8,7 +8,7 @@ Content-Type: text/html
<meta name="verify-v1" content="6zEoK0WMlnLmIS/w7Pnh6+srZECHsvnMGN0kQmowSGk=" />
- <title>%($title '|' $site '|' $siteTitle $siteSubTitle %)</title>
+ <title>%($title '|' $siteTitle $siteSubTitle %)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="author" content="k" />