add icon sanitisation

This commit is contained in:
Howl
2016-11-23 20:19:11 +01:00
parent 8dc5af9406
commit b0c4eb24e5
2 changed files with 34 additions and 3 deletions

View File

@@ -8,7 +8,7 @@ import (
func SanitiseString(s string) string {
n := make([]rune, 0, len(s))
for _, c := range s {
if !unicode.Is(unicode.Other, c) {
if c == '\n' || !unicode.Is(unicode.Other, c) {
n = append(n, c)
}
}