Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
32811d98
Commit
32811d98
authored
May 09, 2016
by
Felipe Artur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make model sanitization methods one liners
parent
d028863e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
6 deletions
+5
-6
CHANGELOG
CHANGELOG
+1
-0
app/models/label.rb
app/models/label.rb
+2
-3
app/models/milestone.rb
app/models/milestone.rb
+2
-3
No files found.
CHANGELOG
View file @
32811d98
...
...
@@ -10,6 +10,7 @@ v 8.8.0 (unreleased)
- Add 'l' shortcut to open Label dropdown on issuables and 'i' to create new issue on a project
- Updated search UI
- Display informative message when new milestone is created
- Sanitize milestones and labels titles
- Allow "NEWS" and "CHANGES" as alternative names for CHANGELOG. !3768 (Connor Shea)
- Added button to toggle whitespaces changes on diff view
- Backport GitLab Enterprise support from EE
...
...
app/models/label.rb
View file @
32811d98
...
...
@@ -117,9 +117,8 @@ class Label < ActiveRecord::Base
LabelsHelper
::
text_color_for_bg
(
self
.
color
)
end
def
title
=
value
value
=
Sanitize
.
clean
(
value
.
to_s
)
if
value
write_attribute
(
:title
,
Sanitize
.
clean
(
value
))
def
title
=
(
value
)
write_attribute
(
:title
,
Sanitize
.
clean
(
value
.
to_s
))
if
value
.
present?
end
private
...
...
app/models/milestone.rb
View file @
32811d98
...
...
@@ -129,9 +129,8 @@ class Milestone < ActiveRecord::Base
nil
end
def
title
=
value
value
=
Sanitize
.
clean
(
value
.
to_s
)
if
value
write_attribute
(
:title
,
value
)
def
title
=
(
value
)
write_attribute
(
:title
,
Sanitize
.
clean
(
value
.
to_s
))
if
value
.
present?
end
# Sorts the issues for the given IDs.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment