User has set the Real Name:
But Discourse does not show the Real Name because it assumes it too similar to the Username
The problem code is https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/components/poster-name.js.es6#L40
if (name && this.get('displayNameOnPosts') && (this.sanitizeName(name) !== this.sanitizeName(username))) {
And sanitize
method is defined as: https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/components/poster-name.js.es6#L7
// sanitize name for comparison
sanitizeName(name){
return name.toLowerCase().replace(/[\s_-]/g,'');
},
I think it could be better the one of:
- have possibility to disable such sanitation
- recode
sanitize
method as
// sanitize name for comparison
sanitizeName(name){
return name.toLowerCase().trim();
},