New (saner?) title format, and extra input sanity check.
This commit is contained in:
parent
c0419c584d
commit
ca99f3f13e
@ -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
|
||||
}
|
||||
|
||||
|
@ -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" />
|
||||
|
Loading…
Reference in New Issue
Block a user