From 56b354a3dc42fb54b81455bca263df2f57a22621 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sat, 7 Nov 2020 12:31:41 +0000 Subject: [PATCH] not use html_safe in app/views/common/_calendar.html.erb git-svn-id: http://svn.redmine.org/redmine/trunk@20292 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/common/_calendar.html.erb | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/app/views/common/_calendar.html.erb b/app/views/common/_calendar.html.erb index 942fb3452..63cb43c97 100644 --- a/app/views/common/_calendar.html.erb +++ b/app/views/common/_calendar.html.erb @@ -11,9 +11,13 @@ -<% day = calendar.startdt -while day <= calendar.enddt %> -<%= ("#{(day+(11-day.cwday)%7).cweek}".html_safe) if day.cwday == calendar.first_wday %> +<% day = calendar.startdt %> +<% while day <= calendar.enddt %> + <% if day.cwday == calendar.first_wday %> + + <%= (day + (11 - day.cwday) % 7).cweek %> + + <% end %>

<%= day.day %>

<% calendar.events_on(day).each do |i| %> @@ -27,14 +31,16 @@ while day <= calendar.enddt %> <% else %> <%= "#{i.project} -" unless @project && @project == i.project %> - <%= link_to_version i%> + <%= link_to_version i %> <% end %> <% end %> -<%= ''.html_safe if day.cwday==calendar.last_wday and day!=calendar.enddt %> -<% day = day + 1 -end %> +<% if day.cwday==calendar.last_wday and day!=calendar.enddt %> + +<% end %> +<% day = day + 1 %> +<% end %> -- 2.39.5