head: html escape meta tag contents
parent
911eca714c
commit
a9a2d8da25
|
@ -4,20 +4,20 @@ echo '<!DOCTYPE html>
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">'
|
||||
|
||||
if [[ ${meta[title]} ]]; then echo "<title>${meta[title]} - ${cfg[title]}</title>"; else echo "<title>${cfg[title]}</title>"; fi
|
||||
if [[ ${meta[author]} ]]; then echo "<meta name='author' content='${meta[author]}'>"; fi
|
||||
if [[ ${meta[description]} ]]; then echo "<meta name='description' content='${meta[description]}'>"; fi
|
||||
if [[ ${meta[keywords]} ]]; then echo "<meta name='keywords' content='${meta[keywords]}'>"; fi
|
||||
if [[ ${meta[refresh]} ]]; then echo "<meta http-equiv='refresh' content='${meta[refresh]}'>"; fi
|
||||
if [[ ${meta[redirect]} ]]; then echo "<meta http-equiv='refresh' content='0; URL=${meta[redirect]}'>"; fi
|
||||
if [[ ${meta[css]} ]]; then echo "<link rel='stylesheet' type='text/css' href='${meta[css]}'/>"; fi
|
||||
if [[ ${meta[title]} ]]; then echo "<meta property='og:title' content='${meta[title]}'>"; fi
|
||||
#if [[ ${meta[og:type]} ]]; then echo "<meta property='og:type' content='${meta[og:type]}'>"; fi
|
||||
if [[ ${cfg[url]} ]]; then echo "<meta property='og:url' content='${cfg[url]}'>"; fi
|
||||
#if [[ ${meta[og:image} ]]; then echo "<meta property='og:image' content='${meta[og:image]}'>"; fi
|
||||
if [[ ${meta[lang]} ]]; then echo "<meta property='og:locale' content='${meta[lang]}'>"; fi
|
||||
if [[ ${meta[description]} ]]; then echo "<meta property='og:description' content='${meta[description]}'>"; fi
|
||||
if [[ ${meta[unsafe]} ]]; then echo "${meta[unsafe]}"; fi
|
||||
if [[ "${meta[title]}" != "" ]]; then echo "<title>$(html_encode "${meta[title]}") - ${cfg[title]}</title>"; else echo "<title>${cfg[title]}</title>"; fi
|
||||
if [[ "${meta[author]}" != "" ]]; then echo "<meta name='author' content='$(html_encode "${meta[author]}")'>"; fi
|
||||
if [[ "${meta[description]}" != "" ]]; then echo "<meta name='description' content='$(html_encode "${meta[description]}")'>"; fi
|
||||
if [[ "${meta[keywords]}" != "" ]]; then echo "<meta name='keywords' content='$(html_encode "${meta[keywords]}")'>"; fi
|
||||
if [[ "${meta[refresh]}" != "" ]]; then echo "<meta http-equiv='refresh' content='$(html_encode "${meta[refresh]}")'>"; fi
|
||||
if [[ "${meta[redirect]}" != "" ]]; then echo "<meta http-equiv='refresh' content='0; URL=$(html_encode "${meta[redirect]}")'>"; fi
|
||||
if [[ "${meta[css]}" != "" ]]; then echo "<link rel='stylesheet' type='text/css' href='$(html_encode "${meta[css]}")'/>"; fi
|
||||
if [[ "${meta[title]}" != "" ]]; then echo "<meta property='og:title' content='$(html_encode "${meta[title]}")'>"; fi
|
||||
#if [[ "${meta[og:type]}" != "" ]]; then echo "<meta property='og:type' content='${meta[og:type]}'>"; fi
|
||||
if [[ "${cfg[url]}" != "" ]]; then echo "<meta property='og:url' content='$(html_encode "${cfg[url]}")'>"; fi
|
||||
#if [[ "${meta[og:image}" != "" ]]; then echo "<meta property='og:image' content='${meta[og:image]}'>"; fi
|
||||
if [[ "${meta[lang]}" != "" ]]; then echo "<meta property='og:locale' content='$(html_encode "${meta[lang]}")'>"; fi
|
||||
if [[ "${meta[description]}" != "" ]]; then echo "<meta property='og:description' content='$(html_encode "${meta[description]}")'>"; fi
|
||||
if [[ "${meta[unsafe]}" != "" ]]; then echo "${meta[unsafe]}"; fi
|
||||
|
||||
echo "<style>
|
||||
body {
|
||||
|
|
Loading…
Reference in New Issue