Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Joe Mooring <joe@mooring.com>
  • Loading branch information
bep and jmooring committed Apr 22, 2024
1 parent 8c87a60 commit 2d50b35
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{{- $src = .RelPermalink -}}
{{- end -}}
{{- end -}}
{{- $attributes := merge .Attributes (dict "alt" (.Text | transform.HTMLEscape) "src" $src "title" (.Title | transform.HTMLEscape)) -}}
{{- $attributes := merge .Attributes (dict "alt" .Text "src" $src "title" (.Title | transform.HTMLEscape)) -}}
<img
{{- range $k, $v := $attributes -}}
{{- if $v -}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@
{{- printf " %s=%q" $k $v | safeHTMLAttr -}}
{{- end -}}
{{- end -}}
>{{ .Text }}</a>
>{{ .Text | safeHTML }}</a>
{{- /**/ -}}

0 comments on commit 2d50b35

Please sign in to comment.