prevent formatted milestone date string from having html escaped

This commit is contained in:
Mike Greiling 2017-03-24 11:43:52 -05:00
parent ec6f091e27
commit 301e176ef4
1 changed files with 2 additions and 0 deletions

View File

@ -89,10 +89,12 @@ module MilestonesHelper
content = time_ago.gsub(/\d+/) { |match| "<strong>#{match}</strong>" }
content.slice!("about ")
content << " remaining"
content.html_safe
elsif milestone.start_date && milestone.start_date.past?
days = milestone.elapsed_days
content = content_tag(:strong, days)
content << " #{'day'.pluralize(days)} elapsed"
content.html_safe
end
end