diff options
author | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-08-31 12:19:48 +0100 |
---|---|---|
committer | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-08-31 12:19:48 +0100 |
commit | b87b69ca3fb266bdb5de88b9e77da54e23e370a5 (patch) | |
tree | 94698670ecd9b8562ae41b0ab793fac821f91f97 /lib/mauve/alert.rb | |
parent | 36543941d784715e962599f7bf73f4680387e610 (diff) |
Fixed up alert suppression to be less jumpy
Diffstat (limited to 'lib/mauve/alert.rb')
-rw-r--r-- | lib/mauve/alert.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/mauve/alert.rb b/lib/mauve/alert.rb index 3810d25..ee5c1ba 100644 --- a/lib/mauve/alert.rb +++ b/lib/mauve/alert.rb @@ -172,15 +172,16 @@ module Mauve html_permitted_in = [:detail] attributes.each do |key, val| - next unless val.is_a?(String) next if html_permitted_in.include?(key) + next unless val.is_a?(String) attribute_set(key, Alert.remove_html(val)) end - html_permitted_in.each do |key| + attributes.each do |key, val| + next unless html_permitted_in.include?(key) next unless val.is_a?(String) - val = attribute_get(key) + attribute_set(key, Alert.clean_html(val)) end end |