Commit 7b24dc082212a6801699e0000e26562dc6ebb3c1

Authored by Leandro Santos
1 parent b4b7ad92

fix html safe erro in raw html block

app/views/blocks/raw_html.html.erb
1 1 <%= block_title(block.title, block.subtitle) %>
2 2  
3   -<%= block.html.html_safe %>
  3 +<%= (block.html || '').html_safe %>
... ...
test/unit/raw_html_block_test.rb
... ... @@ -40,4 +40,11 @@ class RawHTMLBlockTest &lt; ActiveSupport::TestCase
40 40 assert block.editable?(user)
41 41 end
42 42  
  43 + should 'not raise if there is no html defined' do
  44 + block = RawHTMLBlock.new(:html => nil)
  45 + assert_nothing_raised do
  46 + render_block_content(block)
  47 + end
  48 + end
  49 +
43 50 end
... ...