summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Sumaran <alfredo@gitlab.com>2017-03-24 22:52:32 +0000
committerAlfredo Sumaran <alfredo@gitlab.com>2017-03-24 22:52:32 +0000
commit34870e169d80654911101208bb062182bc40f106 (patch)
tree36b14c2c2d537d717bf96f839e466f1fa19bc477
parent3e61bd3ff41fa64312ce8b04e4dff5871ea7aa74 (diff)
parent80fb72996403691865b6ed2c154fbfd86717fce0 (diff)
downloadgitlab-ce-34870e169d80654911101208bb062182bc40f106.tar.gz
Merge branch '30035-milestone-with-due-date-shows-escaped-html' into 'master'
Resolve "Milestone with due date shows escaped HTML" Closes #30035 See merge request !10224
-rw-r--r--app/helpers/milestones_helper.rb2
-rw-r--r--changelogs/unreleased/30035-milestone-with-due-date-shows-escaped-html.yml4
2 files changed, 6 insertions, 0 deletions
diff --git a/app/helpers/milestones_helper.rb b/app/helpers/milestones_helper.rb
index 5053b937c02..bd3f51fc658 100644
--- a/app/helpers/milestones_helper.rb
+++ b/app/helpers/milestones_helper.rb
@@ -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
diff --git a/changelogs/unreleased/30035-milestone-with-due-date-shows-escaped-html.yml b/changelogs/unreleased/30035-milestone-with-due-date-shows-escaped-html.yml
new file mode 100644
index 00000000000..651c299ac66
--- /dev/null
+++ b/changelogs/unreleased/30035-milestone-with-due-date-shows-escaped-html.yml
@@ -0,0 +1,4 @@
+---
+title: Fix escaped html appearing in milestone page
+merge_request: 10224
+author: