diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html index 0288029..f37614f 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 9193ee6..9f6443d 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 6f7725b..6496b6f 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 16b96cd..744f7e3 100644 --- a/layouts/partials/backlinks.html +++ b/layouts/partials/backlinks.html @@ -10,7 +10,7 @@ {{$src = replace $src " " "-"}}