ref: b2d7a2ac0d16132640b089a6496bfad57ae2a96f
parent: 582b3d8a3eed8768a7b7f4be35128c72728b79a1
author: uriel <[email protected]>
date: Sat Mar 15 17:54:24 EDT 2008
New (saner?) title format, and extra input sanity check.
--- 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 @@
. 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
}
--- a/inc/headers.tpl
+++ b/inc/headers.tpl
@@ -8,7 +8,7 @@
<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" />