diff --git a/lib/middleman-blog/uri_templates.rb b/lib/middleman-blog/uri_templates.rb index d82e55c..a0cd666 100644 --- a/lib/middleman-blog/uri_templates.rb +++ b/lib/middleman-blog/uri_templates.rb @@ -76,10 +76,13 @@ def safe_parameterize(str, sep = '-') # Remove leading/trailing separator. parameterized_string.gsub!(/^#{re_sep}|#{re_sep}$/, '') + + # Replace all _ with - parameterized_string.tr!('_', '-') + + # Delete all ? parameterized_string.delete!('?') - # Replace all ? parameterized_string end