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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
8cb78430
Commit
8cb78430
authored
Apr 19, 2021
by
Thomas Randolph
Committed by
Phil Hughes
Apr 19, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix character escaping in Resolved By tooltips
parent
998fe110
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
1 deletion
+28
-1
app/assets/javascripts/batch_comments/mixins/resolved_status.js
...sets/javascripts/batch_comments/mixins/resolved_status.js
+7
-1
changelogs/unreleased/tor-defect-single-quote-escapes.yml
changelogs/unreleased/tor-defect-single-quote-escapes.yml
+5
-0
spec/frontend/notes/components/note_actions_spec.js
spec/frontend/notes/components/note_actions_spec.js
+16
-0
No files found.
app/assets/javascripts/batch_comments/mixins/resolved_status.js
View file @
8cb78430
...
@@ -50,12 +50,18 @@ export default {
...
@@ -50,12 +50,18 @@ export default {
return
this
.
resolveDiscussion
?
'
is-resolving-discussion
'
:
'
is-unresolving-discussion
'
;
return
this
.
resolveDiscussion
?
'
is-resolving-discussion
'
:
'
is-unresolving-discussion
'
;
},
},
resolveButtonTitle
()
{
resolveButtonTitle
()
{
const
escapeParameters
=
false
;
if
(
this
.
isDraft
||
this
.
discussionId
)
return
this
.
resolvedStatusMessage
;
if
(
this
.
isDraft
||
this
.
discussionId
)
return
this
.
resolvedStatusMessage
;
let
title
=
__
(
'
Resolve thread
'
);
let
title
=
__
(
'
Resolve thread
'
);
if
(
this
.
resolvedBy
)
{
if
(
this
.
resolvedBy
)
{
title
=
sprintf
(
__
(
'
Resolved by %{name}
'
),
{
name
:
this
.
resolvedBy
.
name
});
title
=
sprintf
(
__
(
'
Resolved by %{name}
'
),
{
name
:
this
.
resolvedBy
.
name
},
escapeParameters
,
);
}
}
return
title
;
return
title
;
...
...
changelogs/unreleased/tor-defect-single-quote-escapes.yml
0 → 100644
View file @
8cb78430
---
title
:
Fix character escaping in Resolved By tooltips
merge_request
:
59428
author
:
type
:
fixed
spec/frontend/notes/components/note_actions_spec.js
View file @
8cb78430
...
@@ -151,6 +151,22 @@ describe('noteActions', () => {
...
@@ -151,6 +151,22 @@ describe('noteActions', () => {
const
assignUserButton
=
wrapper
.
find
(
'
[data-testid="assign-user"]
'
);
const
assignUserButton
=
wrapper
.
find
(
'
[data-testid="assign-user"]
'
);
expect
(
assignUserButton
.
exists
()).
toBe
(
false
);
expect
(
assignUserButton
.
exists
()).
toBe
(
false
);
});
});
it
(
'
should render the correct (unescaped) name in the Resolved By tooltip
'
,
()
=>
{
const
complexUnescapedName
=
'
This is a Ǝ
\'
𝞓
\'
E "cat"?
'
;
wrapper
=
mountNoteActions
({
...
props
,
canResolve
:
true
,
isResolving
:
false
,
isResolved
:
true
,
resolvedBy
:
{
name
:
complexUnescapedName
,
},
});
const
{
resolveButton
}
=
wrapper
.
vm
.
$refs
;
expect
(
resolveButton
.
$el
.
getAttribute
(
'
title
'
)).
toBe
(
`Resolved by
${
complexUnescapedName
}
`
);
});
});
});
});
});
...
...
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