diff --git a/app/presenters/tree_builder.rb b/app/presenters/tree_builder.rb index efba377da81..78ced79c5fd 100644 --- a/app/presenters/tree_builder.rb +++ b/app/presenters/tree_builder.rb @@ -173,7 +173,7 @@ def add_to_sandbox end def add_root_node(nodes) - root = nodes.first.merge!(root_options) + root = nodes.first.merge!(%i(text tooltip).each_with_object(root_options) { |key, hsh| hsh[key] = ERB::Util.html_escape(hsh[key]) }) if root[:image] root[:image] = ActionController::Base.helpers.image_path(root[:image]) else