New (saner?) title format, and extra input sanity check.
This commit is contained in:
parent
5d43a1db22
commit
e6a5d6ca66
2 changed files with 5 additions and 4 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue