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
Jérome Perrin
gitlab-ce
Commits
4aabf707
Commit
4aabf707
authored
Nov 16, 2016
by
http://jneen.net/
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename `part` variable and guard against nil content_type
parent
64e98040
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
lib/gitlab/email/reply_parser.rb
lib/gitlab/email/reply_parser.rb
+5
-7
No files found.
lib/gitlab/email/reply_parser.rb
View file @
4aabf707
...
@@ -23,15 +23,13 @@ module Gitlab
...
@@ -23,15 +23,13 @@ module Gitlab
private
private
def
select_body
(
message
)
def
select_body
(
message
)
if
message
.
multipart?
part
=
if
message
.
multipart?
text
=
message
.
text_part
||
message
.
html_part
||
message
message
.
text_part
||
message
.
html_part
||
message
else
else
text
=
message
message
end
end
return
""
unless
text
decoded
=
fix_charset
(
part
)
decoded
=
fix_charset
(
text
)
return
""
unless
decoded
return
""
unless
decoded
...
@@ -40,7 +38,7 @@ module Gitlab
...
@@ -40,7 +38,7 @@ module Gitlab
return
""
return
""
end
end
if
text
.
content_type
=~
%r(text/html)
if
(
part
.
content_type
||
''
).
include?
'text/html'
HTMLParser
.
parse_reply
(
decoded
)
HTMLParser
.
parse_reply
(
decoded
)
else
else
decoded
decoded
...
...
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