changeset 1139:5e476516ffea redmine-2.2-integration

Ensure generated HTML is marked as safe & thus rendered
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Thu, 10 Jan 2013 15:11:59 +0000
parents 9e8213f2dfb3
children 59fd55892a7b
files app/helpers/projects_helper.rb app/views/projects/index.html.erb
diffstat 2 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/app/helpers/projects_helper.rb	Thu Jan 10 15:11:44 2013 +0000
+++ b/app/helpers/projects_helper.rb	Thu Jan 10 15:11:59 2013 +0000
@@ -58,7 +58,7 @@
       s << textilizable(project.short_description, :project => project).gsub(/<[^>]+>/, '')
       s << "</div>"
     end
-    s
+    s.html_safe
   end
   
   # Renders a tree of projects as a nested set of unordered lists
@@ -89,8 +89,8 @@
         s << "</div>\n"
         ancestors << project
       end
-      s
     end
+    s.html_safe
   end
 
 
@@ -156,7 +156,7 @@
       s = a
     end
 
-    s
+    s.html_safe
     
   end
 
@@ -190,7 +190,7 @@
 
     @project = original_project
 
-    s
+    s.html_safe
   end
 
 
--- a/app/views/projects/index.html.erb	Thu Jan 10 15:11:44 2013 +0000
+++ b/app/views/projects/index.html.erb	Thu Jan 10 15:11:59 2013 +0000
@@ -4,13 +4,13 @@
 
 <div class="contextual">
     <%= link_to l(:label_overall_activity), { :controller => 'activities', :action => 'index' }%>
-    <%= '| ' + link_to(l(:label_issue_view_all), issues_path) if User.current.allowed_to?(:view_issues, nil, :global => true) %>
-    <%= '| ' + link_to(l(:label_project_new), {:controller => 'projects', :action => 'new'}, :class => 'icon icon-add') if User.current.allowed_to?(:add_project, nil, :global => true) %>
+    <%= ('| ' + link_to(l(:label_issue_view_all), issues_path)).html_safe if User.current.allowed_to?(:view_issues, nil, :global => true) %>
+    <%= ('| ' + link_to(l(:label_project_new), {:controller => 'projects', :action => 'new'}, :class => 'icon icon-add')).html_safe if User.current.allowed_to?(:add_project, nil, :global => true) %>
 </div>
 
 <% if @user_projects %>
   
-  <%= render_my_project_hierarchy(@user_projects)%>
+  <%= render_my_project_hierarchy(@user_projects) %>
 
 <% end %>