Browse files

Validate user_icons

  • Loading branch information...
1 parent b030554 commit 0de1a182dac972ebb158c882a9e3cf733275f4f2 @bootstraponline bootstraponline committed Nov 13, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/gollum/wiki.rb
View
4 lib/gollum/wiki.rb
@@ -203,7 +203,9 @@ def initialize(path, options = {})
@collapse_tree = options.fetch :collapse_tree, false
@css = options.fetch :css, false
@h1_title = options.fetch :h1_title, false
- @user_icons = options.fetch :user_icons, 'none'
+
+ @user_icons = ['gravatar', 'identicon'].include?( options[:user_icons] ) ?
+ options[:user_icons] : 'none'
end
# Public: check whether the wiki's git repo exists on the filesystem.

0 comments on commit 0de1a18

Please sign in to comment.