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
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
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
app/helpers/events_helper.rb
app/helpers/events_helper.rb
+1
-1
spec/helpers/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