BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
2bfee070
Commit
2bfee070
authored
Aug 21, 2017
by
Tim Zallmann
Committed by
Phil Hughes
Aug 21, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve "User profile activity feed contains broken image links"
parent
6509833c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
events_helper.rb
app/helpers/events_helper.rb
+1
-1
events_helper_spec.rb
spec/helpers/events_helper_spec.rb
+6
-0
No files found.
app/helpers/events_helper.rb
View file @
2bfee070
...
...
@@ -176,7 +176,7 @@ module EventsHelper
sanitize
(
text
,
tags:
%w(a img gl-emoji b pre code p span)
,
attributes:
Rails
::
Html
::
WhiteListSanitizer
.
allowed_attributes
+
[
'style'
,
'data-name'
,
'data-unicode-version'
]
attributes:
Rails
::
Html
::
WhiteListSanitizer
.
allowed_attributes
+
[
'style'
,
'data-
src'
,
'data-
name'
,
'data-unicode-version'
]
)
end
...
...
spec/helpers/events_helper_spec.rb
View file @
2bfee070
...
...
@@ -62,6 +62,12 @@ describe EventsHelper do
expect
(
helper
.
event_note
(
input
)).
to
eq
(
expected
)
end
it
'preserves data-src for lazy images'
do
input
=
"![ImageTest](/uploads/test.png)"
image_url
=
"data-src=
\"
/uploads/test.png
\"
"
expect
(
helper
.
event_note
(
input
)).
to
match
(
image_url
)
end
context
'labels formatting'
do
let
(
:input
)
{
'this should be ~label_1'
}
...
...
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