param.html 390 B

123456789101112
  1. {{- /*
  2. Work around wrong escapes in integrity attributes.
  3. */ -}}
  4. {{- $name := .Get 0 -}}
  5. {{- with $name -}}
  6. {{- $value := $.Page.Param . -}}
  7. {{- if in $name "_hash" -}}
  8. {{- $value = $value | safeHTML -}}
  9. {{- end -}}
  10. {{- with $value }}{{ . }}{{ else }}{{ errorf "Param %q not found: %s" $name $.Position }}{{ end -}}
  11. {{- else }}{{ errorf "Missing param key: %s" $.Position }}{{ end -}}