diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbavatar.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbavatar.directive.js index 5d90958dbd..2c561d3505 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbavatar.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbavatar.directive.js @@ -69,8 +69,9 @@ Use this directive to render an avatar. } function getNameInitials(name) { - if(name) { - var names = name.split(' '), + if (name) { + const notAllowed = /[\[\]\{\}\*\?\&\$\@\!\(\)\%\#]+/g; + var names = name.replace(notAllowed,'').trim().split(' '), initials = names[0].substring(0, 1); if (names.length > 1) {