display spaces as they were originally in the password

This commit is contained in:
Erica Wright 2017-10-25 15:48:01 -04:00
parent 6e7ed3cea3
commit 202e428412
No known key found for this signature in database
GPG Key ID: D9F2AF9D67D0AAB7

View File

@ -9,10 +9,11 @@ module.exports = function(state, emit) {
if (!file) {
return notFound(state, emit);
}
const passwordComplete = html`
<div class="selectPassword">
Password: ${file.password}
</div>`;
file.password = file.password || '';
const passwordComplete = html`<div class="selectPassword"></div>`;
passwordComplete.innerHTML = file.password.replace(/ /g, '&nbsp;');
const passwordSection = file.password
? passwordComplete
: uploadPassword(state, emit);