diff options
Diffstat (limited to 'bin')
-rw-r--r-- | bin/func | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -22,6 +22,10 @@ date_default_timezone="+0200" uname=$(uname) +__to_html_id() { + cat /dev/stdin | sed 's/ /%20/g' +} + __get_value() { # 1: filename # 2: Attribute name @@ -202,9 +206,10 @@ __generate_metadata() { if [ "${_show_title}" = "" ]; then _title=$(__get_value_title "${1}") + _title_id=$(echo ${_title} | __to_html_id) cat <<-EOF - <h1 id=\"${_title}\"> + <h1 id="${_title_id}"> ${_title} </h1> EOF |