Browse files

Added a fix to remove unnecessary "_" chars.

Appeared at the beginning and at the end of the generated handle.
Courtesy Michal Szymanski <michal.szymanski@u2i.com>.
  • Loading branch information...
1 parent 535f16a commit 563bd4d3e8e8b36be8a4eab96238598d1fe690c5 @alexreisner committed Mar 14, 2011
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/handler.rb
View
1 lib/handler.rb
@@ -59,6 +59,7 @@ def self.generate_handle(title, separator)
str = str.gsub('&', ' and ') # add space for, e.g., "Y&T"
str = str.delete('.\'"') # no space
str = str.gsub(/\W/, ' ') # space
+ str = str.strip
str = str.gsub(/ +/, separator)
str
end

0 comments on commit 563bd4d

Please sign in to comment.