prevent formatted milestone date string from having html escaped
This commit is contained in:
parent
ec6f091e27
commit
301e176ef4
|
@ -89,10 +89,12 @@ module MilestonesHelper
|
||||||
content = time_ago.gsub(/\d+/) { |match| "<strong>#{match}</strong>" }
|
content = time_ago.gsub(/\d+/) { |match| "<strong>#{match}</strong>" }
|
||||||
content.slice!("about ")
|
content.slice!("about ")
|
||||||
content << " remaining"
|
content << " remaining"
|
||||||
|
content.html_safe
|
||||||
elsif milestone.start_date && milestone.start_date.past?
|
elsif milestone.start_date && milestone.start_date.past?
|
||||||
days = milestone.elapsed_days
|
days = milestone.elapsed_days
|
||||||
content = content_tag(:strong, days)
|
content = content_tag(:strong, days)
|
||||||
content << " #{'day'.pluralize(days)} elapsed"
|
content << " #{'day'.pluralize(days)} elapsed"
|
||||||
|
content.html_safe
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue