From: Toshi MARUYAMA Date: Sat, 7 Nov 2020 12:31:41 +0000 (+0000) Subject: not use html_safe in app/views/common/_calendar.html.erb X-Git-Tag: 4.2.0~525 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=56b354a3dc42fb54b81455bca263df2f57a22621;p=redmine.git 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 --- 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 %>