Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2020-07-07 18:03:11 +0300
committernpmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>2020-07-09 10:05:15 +0300
commit00d545f87e30e0648ff90f56499fbb8715969ecd (patch)
tree692f58d1306ee6ac5d786bdef345f881e6eee5a4 /core/src
parentf3768e2a2a3b4dc898d1760ff7bba1e9ef743fa2 (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.js2
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);
}
}