Merge pull request #1550 from mnjm/fix-1549-url-encoding

🐛 fix: https://github.com/nunocoracao/blowfish/issues/1549
This commit is contained in:
Nuno Coração 2024-06-19 17:01:20 +01:00 committed by GitHub
commit 2d3fa0185d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View file

@ -1,6 +1,6 @@
{{ $url := .Get "url" }} {{ $url := .Get "url" }}
{{ $type := .Get "type" }} {{ $type := .Get "type" }}
{{ with resources.GetRemote (printf $url) }} {{ with resources.GetRemote (urls.Parse $url) }}
{{ $codeBlock := printf "```%s\n%s\n```" $type .Content }} {{ $codeBlock := printf "```%s\n%s\n```" $type .Content }}
{{ $codeBlock | markdownify }} {{ $codeBlock | markdownify }}
{{ else }} {{ else }}

View file

@ -1,6 +1,6 @@
{{ $url := .Get "url"}} {{ $url := .Get "url"}}
{{ with resources.GetRemote (printf $url) }} {{ with resources.GetRemote (urls.Parse $url) }}
{{ .Content | markdownify }} {{ .Content | markdownify }}
{{ else }} {{ else }}
{{ errorf "Mardown Importer Shortcode - Unable to get remote resource" . }} {{ errorf "Mardown Importer Shortcode - Unable to get remote resource" . }}
{{ end }} {{ end }}