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) { if (!file) {
return notFound(state, emit); return notFound(state, emit);
} }
const passwordComplete = html`
<div class="selectPassword"> file.password = file.password || '';
Password: ${file.password} const passwordComplete = html`<div class="selectPassword"></div>`;
</div>`; passwordComplete.innerHTML = file.password.replace(/ /g, '&nbsp;');
const passwordSection = file.password const passwordSection = file.password
? passwordComplete ? passwordComplete
: uploadPassword(state, emit); : uploadPassword(state, emit);