# Discourse does not show the Real Name on a topic page then it (wrongly) assumes it is the same as the Username

**URL:** <https://meta.discourse.org/t/discourse-does-not-show-the-real-name-on-a-topic-page-then-it-wrongly-assumes-it-is-the-same-as-the-username/29399>\
**Category:** Feature\
**Created:** [5월 29, 2015, 1:27오전 UTC](https://meta.discourse.org/t/discourse-does-not-show-the-real-name-on-a-topic-page-then-it-wrongly-assumes-it-is-the-same-as-the-username/29399 "2015-05-29T01:27:48Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![dmitry\_fedyuk](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dmitry_fedyuk/32/293153_2.png) [@dmitry\_fedyuk](https://meta.discourse.org/u/dmitry_fedyuk)\
**Post date:** [5월 29, 2015, 1:27오전 UTC](https://meta.discourse.org/t/discourse-does-not-show-the-real-name-on-a-topic-page-then-it-wrongly-assumes-it-is-the-same-as-the-username/29399/1 "2015-05-29T01:27:48Z")

</div>

User has set the Real Name:  
 ![](https://global.discourse-cdn.com/meta/original/3X/f/9/f947559785b60c37f1cf82b58425cc546888d7c2.png)

But Discourse does not show the Real Name because it assumes it too similar to the Username  
 ![](https://global.discourse-cdn.com/meta/original/3X/e/6/e69319aa0f5c63cb74d8de5cf5c2ff089b381d12.png)

The problem code is [https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/components/poster-name.js.es6#L40](https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/components/poster-name.js.es6#L40)

```ruby
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](https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/components/poster-name.js.es6#L7)

```javascript
  // 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

```javascript
  // sanitize name for comparison
  sanitizeName(name){
    return name.toLowerCase().trim();
  },

```

---

_[View the full topic](https://meta.discourse.org/t/discourse-does-not-show-the-real-name-on-a-topic-page-then-it-wrongly-assumes-it-is-the-same-as-the-username/29399)._
