From 0de1a182dac972ebb158c882a9e3cf733275f4f2 Mon Sep 17 00:00:00 2001 From: bootstraponline Date: Tue, 13 Nov 2012 22:48:37 -0700 Subject: [PATCH] Validate user_icons --- lib/gollum/wiki.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/gollum/wiki.rb b/lib/gollum/wiki.rb index 89789682..4e70f547 100644 --- a/lib/gollum/wiki.rb +++ b/lib/gollum/wiki.rb @@ -203,7 +203,9 @@ module Gollum @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.