Merge branch '55276-encoding-issue-with-the-user-centric-tooltips' into 'master'
Resolve "Encoding issue with the user centric tooltips" Closes #55276 See merge request gitlab-org/gitlab-ce!23794
This commit is contained in:
commit
dac38419fe
|
@ -30,10 +30,14 @@ export default {
|
|||
computed: {
|
||||
jobLine() {
|
||||
if (this.user.bio && this.user.organization) {
|
||||
return sprintf(__('%{bio} at %{organization}'), {
|
||||
bio: this.user.bio,
|
||||
organization: this.user.organization,
|
||||
});
|
||||
return sprintf(
|
||||
__('%{bio} at %{organization}'),
|
||||
{
|
||||
bio: this.user.bio,
|
||||
organization: this.user.organization,
|
||||
},
|
||||
false,
|
||||
);
|
||||
} else if (this.user.bio) {
|
||||
return this.user.bio;
|
||||
} else if (this.user.organization) {
|
||||
|
|
|
@ -101,6 +101,19 @@ describe('User Popover Component', () => {
|
|||
|
||||
expect(vm.$el.textContent).toContain('Engineer at GitLab');
|
||||
});
|
||||
|
||||
it('should not encode special characters when we have bio and organization', () => {
|
||||
const testProps = Object.assign({}, DEFAULT_PROPS);
|
||||
testProps.user.bio = 'Manager & Team Lead';
|
||||
testProps.user.organization = 'GitLab';
|
||||
|
||||
vm = mountComponent(UserPopover, {
|
||||
...DEFAULT_PROPS,
|
||||
target: document.querySelector('.js-user-link'),
|
||||
});
|
||||
|
||||
expect(vm.$el.textContent).toContain('Manager & Team Lead at GitLab');
|
||||
});
|
||||
});
|
||||
|
||||
describe('status data', () => {
|
||||
|
|
Loading…
Reference in New Issue