fix XSS on opengraph tags

This commit is contained in:
2020-12-07 22:23:29 +01:00
parent 69e3a34d86
commit e35e6b0f45
8 changed files with 95 additions and 97 deletions

View File

@@ -0,0 +1,13 @@
{{ define "opengraph" }}
{{ range $kv := .OGRules }}
<meta property="{{ $kv.Key }}" content="{{ $kv.Value }}" />
{{ end }}
{{ range $kv := .TwitterRules }}
<meta name="{{ $kv.Key }}" content="{{ $kv.Value }}" />
{{ end }}
{{ range $kv := .LinkRules }}
<link rel="{{ $kv.Key }}" href="{{ $kv.Value }}" />
{{ end }}
{{ end }}