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
0
Merge Requests
0
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
iv
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)
...
@@ -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
- Add 'l' shortcut to open Label dropdown on issuables and 'i' to create new issue on a project
- Updated search UI
- Updated search UI
- Display informative message when new milestone is created
- 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)
- Allow "NEWS" and "CHANGES" as alternative names for CHANGELOG. !3768 (Connor Shea)
- Added button to toggle whitespaces changes on diff view
- Added button to toggle whitespaces changes on diff view
- Backport GitLab Enterprise support from EE
- Backport GitLab Enterprise support from EE
...
...
app/models/label.rb
View file @
32811d98
...
@@ -117,9 +117,8 @@ class Label < ActiveRecord::Base
...
@@ -117,9 +117,8 @@ class Label < ActiveRecord::Base
LabelsHelper
::
text_color_for_bg
(
self
.
color
)
LabelsHelper
::
text_color_for_bg
(
self
.
color
)
end
end
def
title
=
value
def
title
=
(
value
)
value
=
Sanitize
.
clean
(
value
.
to_s
)
if
value
write_attribute
(
:title
,
Sanitize
.
clean
(
value
.
to_s
))
if
value
.
present?
write_attribute
(
:title
,
Sanitize
.
clean
(
value
))
end
end
private
private
...
...
app/models/milestone.rb
View file @
32811d98
...
@@ -129,9 +129,8 @@ class Milestone < ActiveRecord::Base
...
@@ -129,9 +129,8 @@ class Milestone < ActiveRecord::Base
nil
nil
end
end
def
title
=
value
def
title
=
(
value
)
value
=
Sanitize
.
clean
(
value
.
to_s
)
if
value
write_attribute
(
:title
,
Sanitize
.
clean
(
value
.
to_s
))
if
value
.
present?
write_attribute
(
:title
,
value
)
end
end
# Sorts the issues for the given IDs.
# 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