Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
{{- /*
2
  Work around wrong escapes in integrity attributes.
3
  Original: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/shortcodes/param.html
4
*/ -}}
5
 
6
{{- $name := .Get 0 -}}
7
{{- with $name -}}
8
{{- $value := $.Page.Param . -}}
9
{{- /* If any parameter ends with `_hash`, mark the string as safe HTML */ -}}
10
{{- if (strings.HasSuffix $name "_hash") -}}
11
  {{- $value = $value | safeHTML -}}
12
{{- end -}}
13
{{- with $value }}{{ . }}{{ else }}{{ errorf "Param %q not found: %s" $name $.Position }}{{ end -}}
14
{{- else }}{{ errorf "Missing param key: %s" $.Position }}{{ end -}}