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/label.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/label.rb')
-rw-r--r-- | app/models/label.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/label.rb b/app/models/label.rb index 9a22398d952..8a24a6e69b3 100644 --- a/app/models/label.rb +++ b/app/models/label.rb @@ -117,6 +117,10 @@ class Label < ActiveRecord::Base LabelsHelper::text_color_for_bg(self.color) end + def title=(value) + write_attribute(:title, Sanitize.clean(value.to_s)) if value.present? + end + private def label_format_reference(format = :id) |