handle non strings passed to Page.cname
This commit is contained in:
+3
-1
@@ -202,7 +202,9 @@ module Gollum
|
||||
#
|
||||
# Returns the String canonical name.
|
||||
def self.cname(name)
|
||||
name.gsub(%r{[ /<>]}, '-')
|
||||
name.respond_to?(:gsub) ?
|
||||
name.gsub(%r{[ /<>]}, '-') :
|
||||
''
|
||||
end
|
||||
|
||||
# Convert a format Symbol into an extension String.
|
||||
|
||||
Reference in New Issue
Block a user