diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html index 0288029d..f37614f0 100644 --- a/layouts/_default/_markup/render-link.html +++ b/layouts/_default/_markup/render-link.html @@ -1,4 +1,5 @@ {{$trimmed := strings.TrimSuffix ".md" (.Destination | safeURL)}} +{{$trimmed = replace $trimmed "%20" "-"}} {{$external := strings.HasPrefix $trimmed "http" }} {{ if $external }} {{ .Text | safeHTML }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 9193ee62..9f6443d1 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,6 +1,3 @@ -{{$content := replaceRE `a href="\.\.\/(.+%20.+)+"` `$1` .Content}} -{{$content = replace $content "%20" "-"}} -{{$content = $content | safeHTML}} {{ partial "head.html" . }} @@ -22,7 +19,7 @@ {{ .TableOfContents }} {{end}} - {{- $content -}} + {{.Content}} {{partial "footer.html" .}} diff --git a/layouts/index.html b/layouts/index.html index 6f7725bf..6496b6fe 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,6 +1,3 @@ -{{$content := replaceRE `a href="\.\.\/(.+%20.+)+"` `$1` .Content}} -{{$content = replace $content "%20" "-"}} -{{$content = $content | safeHTML}} {{ partial "head.html" . }} @@ -22,7 +19,7 @@ {{ .TableOfContents }} {{end}} - {{- $content -}} + {{- .Content -}} {{partial "footer.html" .}} diff --git a/layouts/partials/backlinks.html b/layouts/partials/backlinks.html index 16b96cdf..744f7e36 100644 --- a/layouts/partials/backlinks.html +++ b/layouts/partials/backlinks.html @@ -10,7 +10,7 @@ {{$src = replace $src " " "-"}}