diff --git a/app/scripts/util/formatting/password-presenter.js b/app/scripts/util/formatting/password-presenter.js index a7271077..584a0865 100644 --- a/app/scripts/util/formatting/password-presenter.js +++ b/app/scripts/util/formatting/password-presenter.js @@ -8,6 +8,11 @@ class RandomNameGenerator { } function charCodeToHtml(char) { + // convert certain special chars like space into to non-breaking space + // ' ' to &#nbsp; + if (char === 32 || char === 8193 || char === 8239) { + char = 160; + } return Math.random() < 0.2 ? String.fromCharCode(char) : `&#x${char.toString(16)};`; }