diff options
author | Julius Härtl <jus@bitgrid.net> | 2020-07-07 18:03:11 +0300 |
---|---|---|
committer | npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com> | 2020-07-09 10:05:15 +0300 |
commit | 00d545f87e30e0648ff90f56499fbb8715969ecd (patch) | |
tree | 692f58d1306ee6ac5d786bdef345f881e6eee5a4 /core/src | |
parent | f3768e2a2a3b4dc898d1760ff7bba1e9ef743fa2 (diff) |
Fix placeholder issues with multiplace spaces in the name
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/jquery/placeholder.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/jquery/placeholder.js b/core/src/jquery/placeholder.js index b26f06a6302..6c5f94313f6 100644 --- a/core/src/jquery/placeholder.js +++ b/core/src/jquery/placeholder.js @@ -164,7 +164,7 @@ $.fn.imageplaceholder = function(seed, text, size) { this.css('font-size', (height * 0.55) + 'px') if (seed !== null && seed.length) { - var placeholderText = text.split(' ', 2).map((word) => word[0].toUpperCase()).join('') + var placeholderText = text.replace(/\s+/g, ' ').trim().split(' ', 2).map((word) => word[0].toUpperCase()).join('') this.html(placeholderText); } } |