diff options
author | Anton Ageev <antage@gmail.com> | 2014-02-02 18:18:01 +0400 |
---|---|---|
committer | spf13 <steve.francia@gmail.com> | 2014-02-05 20:49:57 +0400 |
commit | 11ca84f8cb19f01b7977b549e63e0ce0d126054e (patch) | |
tree | 2b6c1d554b0abeef47f08edaad49cbca5d4d80ba /target | |
parent | 24ffe04360f337c7b189df52b9a7c22683ef395e (diff) |
Add unicode support for aliases, indexes, urlize template filter.
Now aliases and indexes are not restricted ASCII letters and can include
any unicode letters.
Diffstat (limited to 'target')
-rw-r--r-- | target/alias_test.go | 1 | ||||
-rw-r--r-- | target/htmlredirect.go | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/target/alias_test.go b/target/alias_test.go index 7f5db79af..d19349f23 100644 --- a/target/alias_test.go +++ b/target/alias_test.go @@ -20,6 +20,7 @@ func TestHTMLRedirectAlias(t *testing.T) { {"alias 3.html", "alias-3.html"}, {"alias4.html", "alias4.html"}, {"/alias 5.html", "/alias-5.html"}, + {"/трям.html", "/трям.html"}, } for _, test := range tests { diff --git a/target/htmlredirect.go b/target/htmlredirect.go index 53e900f91..55f4896e1 100644 --- a/target/htmlredirect.go +++ b/target/htmlredirect.go @@ -39,7 +39,7 @@ func (h *HTMLRedirectAlias) Translate(alias string) (aliasPath string, err error } else if !strings.HasSuffix(alias, ".html") { alias = alias + "/index.html" } - return path.Join(h.PublishDir, helpers.Urlize(alias)), nil + return path.Join(h.PublishDir, helpers.MakePath(alias)), nil } type AliasNode struct { |