Properly handle dashes in paths the same way we treated underscores when generating page titles. This includes sitemaps, sidebar nav trees and the page title header itself.

This commit is contained in:
Uriel 2009-07-19 08:01:42 +02:00
parent 4345888b7f
commit 01876141f3
3 changed files with 3 additions and 3 deletions

View file

@ -24,7 +24,7 @@ fn nav_tree {
bname = $NF d
path = $0 d
gsub("_", " ", bname)
gsub(/[\-_]/, " ", bname)
if(index(ENVIRON["req_path"] "/", path) == 1)
print "<li><a href=\"" path "\" class=\"thisPage\">&raquo;<i> " bname "</i></a></li>"

View file

@ -70,7 +70,7 @@ fn werc_exec_request {
perm_redirect $req_path^'/'
if(! ~ $#args 0)
pageTitle=`{ echo $args|sed -e 's/([a-z])-([a-z])/\1 \2/g' -e 's/ / - /g' -e 's/_/ /g' }
ifs=$NEW_LINE { pageTitle=`{ echo $args|sed -e 's/ / - /g' -e 's/([a-z])-([a-z])/\1 \2/g' -e 's/_/ /g' } }
cd $sitedir
req_paths_list='/' # Note: req_paths_list doesn't include 'stnythetic' dirs.