diff options
author | Rémy Coutable <remy@rymai.me> | 2016-05-09 18:47:48 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-05-09 18:47:48 +0300 |
commit | 0c2bb8d1d701d74ff720f12c3019cf51fbc77913 (patch) | |
tree | 80b0b36bf04db55d163c6885dbf57d12e6d26bab /app/models/milestone.rb | |
parent | 8dd2188b8367ad18bf005c855ef55f001a0b5fd1 (diff) | |
parent | 32811d98fe2893a0671fe22c4aebf8bd254b7709 (diff) |
Merge branch 'issue_15394' into 'master'
Sanitize milestones and labels titles
fixes #15394
See merge request !4046
Diffstat (limited to 'app/models/milestone.rb')
-rw-r--r-- | app/models/milestone.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/milestone.rb b/app/models/milestone.rb index 5ee8a965ad8..b19935cad6f 100644 --- a/app/models/milestone.rb +++ b/app/models/milestone.rb @@ -129,6 +129,10 @@ class Milestone < ActiveRecord::Base nil end + def title=(value) + write_attribute(:title, Sanitize.clean(value.to_s)) if value.present? + end + # Sorts the issues for the given IDs. # # This method runs a single SQL query using a CASE statement to update the |