remove unnecessary regex, use encodeuri for label instead of replace
This commit is contained in:
1 parent
a14d06aa3d
commit
9292de6333
5 files changed
+5
-10
No files matched your search
@@ -1,4 +1,5 @@
|
||||
{{$trimmed := strings.TrimSuffix ".md" (.Destination | safeURL)}}
|
||||
{{$trimmed = replace $trimmed "%20" "-"}}
|
||||
{{$external := strings.HasPrefix $trimmed "http" }}
|
||||
{{ if $external }}
|
||||
<a href="{{ $trimmed }}" rel="noopener">{{ .Text | safeHTML }}</a>
|
||||
|
||||
Reference in new issue
Block a user