Make # survice Url cleaning

To enable anchors in Urls.

Fixes #888
This commit is contained in:
bep 2015-02-10 19:13:45 +01:00
parent e3daa359ec
commit fa71f6c11e
2 changed files with 17 additions and 1 deletions

View file

@ -92,7 +92,7 @@ func UnicodeSanitize(s string) string {
target := make([]rune, 0, len(source))
for _, r := range source {
if unicode.IsLetter(r) || unicode.IsDigit(r) || r == '.' || r == '/' || r == '_' || r == '-' {
if unicode.IsLetter(r) || unicode.IsDigit(r) || r == '.' || r == '/' || r == '_' || r == '-' || r == '#' {
target = append(target, r)
}
}