lib/permalink/string_ext.rb in permalink-1.1.1 vs lib/permalink/string_ext.rb in permalink-1.1.2
- old
+ new
@@ -1,8 +1,9 @@
class String
def to_permalink
str = ActiveSupport::Multibyte::Chars.new(self)
str = str.normalize(:kd).gsub(/[^\x00-\x7F]/,'').to_s
+ str.gsub!(/'/, "")
str.gsub!(/[^-\w\d]+/sim, "-")
str.gsub!(/-+/sm, "-")
str.gsub!(/^-?(.*?)-?$/, '\1')
str.downcase!
str