Fix double-escaping of config settings

This commit is contained in:
Aggelos Orfanakos 2013-07-12 23:06:51 +03:00
parent fffe36f42c
commit 83d83c5c8c

View file

@ -15,11 +15,11 @@ module Middleman
key_classes << 'modified' if @setting.value_set? key_classes << 'modified' if @setting.value_set?
content << content_tag(:span, @setting.key.inspect, :class => key_classes.join(' ')) content << content_tag(:span, @setting.key.inspect, :class => key_classes.join(' '))
content << " = " content << " = "
content << content_tag(:span, CGI::escapeHTML(@setting.value.inspect), :class => 'value') content << content_tag(:span, @setting.value.inspect, :class => 'value')
if @setting.default if @setting.default
content << content_tag(:span, :class => 'default') do content << content_tag(:span, :class => 'default') do
if @setting.value_set? if @setting.value_set?
"Default: #{CGI::escapeHTML(@setting.default.inspect)}" "Default: #{@setting.default.inspect}"
else else
"(Default)" "(Default)"
end end