Commit 26fcf833 authored by Clement Ho's avatar Clement Ho Committed by Annabel Gray

Resolve "Placeholder note renders the user name in a new line"

parent 7a21c911
...@@ -1675,7 +1675,7 @@ export default class Notes { ...@@ -1675,7 +1675,7 @@ export default class Notes {
<div class="note-header"> <div class="note-header">
<div class="note-header-info"> <div class="note-header-info">
<a href="/${_.escape(currentUsername)}"> <a href="/${_.escape(currentUsername)}">
<span class="d-none d-sm-block">${_.escape( <span class="d-none d-sm-inline-block">${_.escape(
currentUsername, currentUsername,
)}</span> )}</span>
<span class="note-headline-light">${_.escape( <span class="note-headline-light">${_.escape(
...@@ -1694,7 +1694,7 @@ export default class Notes { ...@@ -1694,7 +1694,7 @@ export default class Notes {
</li>`, </li>`,
); );
$tempNote.find('.d-none.d-sm-block').text(_.escape(currentUserFullname)); $tempNote.find('.d-none.d-sm-inline-block').text(_.escape(currentUserFullname));
$tempNote $tempNote
.find('.note-headline-light') .find('.note-headline-light')
.text(`@${_.escape(currentUsername)}`); .text(`@${_.escape(currentUsername)}`);
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
<div class="note-header"> <div class="note-header">
<div class="note-header-info"> <div class="note-header-info">
<a :href="getUserData.path"> <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> <span class="note-headline-light">@{{ getUserData.username }}</span>
</a> </a>
</div> </div>
......
...@@ -974,7 +974,7 @@ import timeoutPromise from './helpers/set_timeout_promise_helper'; ...@@ -974,7 +974,7 @@ import timeoutPromise from './helpers/set_timeout_promise_helper';
).toBeFalsy(); ).toBeFalsy();
expect( expect(
$tempNoteHeader $tempNoteHeader
.find('.d-none.d-sm-block') .find('.d-none.d-sm-inline-block')
.text() .text()
.trim(), .trim(),
).toEqual(currentUserFullname); ).toEqual(currentUserFullname);
...@@ -1020,7 +1020,7 @@ import timeoutPromise from './helpers/set_timeout_promise_helper'; ...@@ -1020,7 +1020,7 @@ import timeoutPromise from './helpers/set_timeout_promise_helper';
const $tempNoteHeader = $tempNote.find('.note-header'); const $tempNoteHeader = $tempNote.find('.note-header');
expect( expect(
$tempNoteHeader $tempNoteHeader
.find('.d-none.d-sm-block') .find('.d-none.d-sm-inline-block')
.text() .text()
.trim(), .trim(),
).toEqual('Foo &lt;script&gt;alert(&quot;XSS&quot;)&lt;/script&gt;'); ).toEqual('Foo &lt;script&gt;alert(&quot;XSS&quot;)&lt;/script&gt;');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment