summaryrefslogtreecommitdiffstats
path: root/lib/redmine/field_format.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2015-04-25 08:00:11 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2015-04-25 08:00:11 +0000
commit16b5ff6aaf7974fd3232d567125e68a41fca2476 (patch)
treea02471dddec1043c6f0b0f67b8b850d7d8cce9ac /lib/redmine/field_format.rb
parenta45db2a6728162525ba3015f9d8ea08f89197231 (diff)
downloadredmine-16b5ff6aaf7974fd3232d567125e68a41fca2476.tar.gz
redmine-16b5ff6aaf7974fd3232d567125e68a41fca2476.zip
Custom field (long text format) displayed even if empty (#19482).
git-svn-id: http://svn.redmine.org/redmine/trunk@14215 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/field_format.rb')
-rw-r--r--lib/redmine/field_format.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/redmine/field_format.rb b/lib/redmine/field_format.rb
index 8cb3bc45d..05a329dbf 100644
--- a/lib/redmine/field_format.rb
+++ b/lib/redmine/field_format.rb
@@ -300,10 +300,14 @@ module Redmine
def formatted_value(view, custom_field, value, customized=nil, html=false)
if html
- if custom_field.text_formatting == 'full'
- view.textilizable(value, :object => customized)
+ if value.present?
+ if custom_field.text_formatting == 'full'
+ view.textilizable(value, :object => customized)
+ else
+ view.simple_format(html_escape(value))
+ end
else
- view.simple_format(html_escape(value))
+ ''
end
else
value.to_s