Merge pull request #21736 from nextcloud/bugfix/21433

Fix placeholder issues with multiplace spaces in the name
This commit is contained in:
Joas Schilling 2020-07-09 12:55:34 +02:00 committed by GitHub
commit 71a62670cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -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);
}
}