Permalink
Browse files

Add more blacklisted characters in the slugify. I think there's proba…

…bly an easier way to do this, like removing all non-word characters.
  • Loading branch information...
1 parent 9f6fc7b commit 6132b1f161906a86a6d99d38b6a19f694194cba7 @nickoneill committed Feb 23, 2012
Showing with 2 additions and 4 deletions.
  1. +2 −4 publisher.go
View
@@ -23,9 +23,7 @@ import (
var _ = os.Stdout
-// const app_key = "ylg2zoaj78ol2dz"
-// const app_secret = "i2863bf9odkbdl7"
-const callback_url = "http://www.someurl.com/callback"
+ const callback_url = "http://www.someurl.com/callback"
var (
config Config
@@ -386,7 +384,7 @@ func slugify(orig string) string {
// TODO: remove wordlist
// replace invalid characters
- noinvalid := regexp.MustCompile("[/'.]").ReplaceAll([]byte(orig), []byte(""))
+ noinvalid := regexp.MustCompile("[/'.?\"]").ReplaceAll([]byte(orig), []byte(""))
// replace spaces
sansspaces := regexp.MustCompile("[\\s]").ReplaceAll(noinvalid, []byte("-"))
// lowercase

0 comments on commit 6132b1f

Please sign in to comment.