Permalink
Browse files

removed u flag on regexp

  • Loading branch information...
1 parent a66496b commit 4d28d2bb1460db3bf7007cb1beadb00ef8c58f01 @bkoski bkoski committed Apr 29, 2010
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/slug/slug.rb
View
@@ -63,9 +63,9 @@ def normalize_slug
s = ActiveSupport::Multibyte.proxy_class.new(self[self.slug_column]).normalize(:kc)
s.downcase!
s.strip!
- s.gsub!(/[^\w\s-]/u, '') # Remove non-word characters
- s.gsub!(/\s+/u, '-') # Convert whitespaces to dashes
- s.gsub!(/-\z/u, '') # Remove trailing dashes
+ s.gsub!(/[^\w\s-]/, '') # Remove non-word characters
+ s.gsub!(/\s+/, '-') # Convert whitespaces to dashes
+ s.gsub!(/-\z/, '') # Remove trailing dashes
s.gsub!(/-+/, '-') # get rid of double-dashes
self[self.slug_column] = s.to_s
end

0 comments on commit 4d28d2b

Please sign in to comment.