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
Léo-Paul Géneau
gitlab-ce
Commits
26fcf833
Commit
26fcf833
authored
Jun 14, 2018
by
Clement Ho
Committed by
Annabel Gray
Jun 14, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve "Placeholder note renders the user name in a new line"
parent
7a21c911
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
app/assets/javascripts/notes.js
app/assets/javascripts/notes.js
+2
-2
app/assets/javascripts/vue_shared/components/notes/placeholder_note.vue
...ascripts/vue_shared/components/notes/placeholder_note.vue
+1
-1
spec/javascripts/notes_spec.js
spec/javascripts/notes_spec.js
+2
-2
No files found.
app/assets/javascripts/notes.js
View file @
26fcf833
...
...
@@ -1675,7 +1675,7 @@ export default class Notes {
<div class="note-header">
<div class="note-header-info">
<a href="/
${
_
.
escape
(
currentUsername
)}
">
<span class="d-none d-sm-block">
${
_
.
escape
(
<span class="d-none d-sm-
inline-
block">
${
_
.
escape
(
currentUsername
,
)}
</span>
<span class="note-headline-light">
${
_
.
escape
(
...
...
@@ -1694,7 +1694,7 @@ export default class Notes {
</li>`
,
);
$tempNote
.
find
(
'
.d-none.d-sm-block
'
).
text
(
_
.
escape
(
currentUserFullname
));
$tempNote
.
find
(
'
.d-none.d-sm-
inline-
block
'
).
text
(
_
.
escape
(
currentUserFullname
));
$tempNote
.
find
(
'
.note-headline-light
'
)
.
text
(
`@
${
_
.
escape
(
currentUsername
)}
`
);
...
...
app/assets/javascripts/vue_shared/components/notes/placeholder_note.vue
View file @
26fcf833
...
...
@@ -54,7 +54,7 @@
<div
class=
"note-header"
>
<div
class=
"note-header-info"
>
<a
:href=
"getUserData.path"
>
<span
class=
"d-none d-sm-block"
>
{{
getUserData
.
name
}}
</span>
<span
class=
"d-none d-sm-
inline-
block"
>
{{
getUserData
.
name
}}
</span>
<span
class=
"note-headline-light"
>
@
{{
getUserData
.
username
}}
</span>
</a>
</div>
...
...
spec/javascripts/notes_spec.js
View file @
26fcf833
...
...
@@ -974,7 +974,7 @@ import timeoutPromise from './helpers/set_timeout_promise_helper';
).
toBeFalsy
();
expect
(
$tempNoteHeader
.
find
(
'
.d-none.d-sm-block
'
)
.
find
(
'
.d-none.d-sm-
inline-
block
'
)
.
text
()
.
trim
(),
).
toEqual
(
currentUserFullname
);
...
...
@@ -1020,7 +1020,7 @@ import timeoutPromise from './helpers/set_timeout_promise_helper';
const
$tempNoteHeader
=
$tempNote
.
find
(
'
.note-header
'
);
expect
(
$tempNoteHeader
.
find
(
'
.d-none.d-sm-block
'
)
.
find
(
'
.d-none.d-sm-
inline-
block
'
)
.
text
()
.
trim
(),
).
toEqual
(
'
Foo <script>alert("XSS")</script>
'
);
...
...
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