# Can Send Empty Chat Messages

**URL:** https://meta.discourse.org/t/can-send-empty-chat-messages/265555
**Category:** Bug
**Tags:** chat
**Created:** [May 19, 2023, 12:45pm UTC](https://meta.discourse.org/t/can-send-empty-chat-messages/265555 "2023-05-19T12:45:43Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![codergautam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codergautam/32/261083_2.png) [@codergautam](https://meta.discourse.org/u/codergautam)
#### Post date: [May 19, 2023, 12:45pm UTC](https://meta.discourse.org/t/can-send-empty-chat-messages/265555/1 "2023-05-19T12:45:43Z")

</div>

Hi, there is a bug with Chat that allows you to send empty messages which only contain spaces. I have looked through settings but cannot find anything that would help me. Thanks

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [May 22, 2023, 6:53am UTC](https://meta.discourse.org/t/can-send-empty-chat-messages/265555/2 "2023-05-22T06:53:57Z")

</div>

Legit… this is an oversight and certainly looks odd… we should ban “blank” both server side and client side.

Blank is a tricky animal

> [@Adding text between \<\> characters renders an empty post. (Example in this post)](https://meta.discourse.org/t/adding-text-between-characters-renders-an-empty-post-example-in-this-post/180147/4):
>
> When we have seen the same issue, we simply fence them with MD. \<here is the good stuff\> \<here is the sweet stuff\> ```\<here is the good stuff\>``` `\<here is the sweet stuff\>`

> [@Khmer Unicode Zero Width Space disappears after posting](https://meta.discourse.org/t/khmer-unicode-zero-width-space-disappears-after-posting/26260):
>
> Hi there, I just installed discourse and found out that it didn’t support Zero Width Space at all. It is Khmer Unicode special character that represents a hidden space to separate each word. you can take a look here [http://www.askcambodia.org/t/angelababy/21](http://www.askcambodia.org/t/angelababy/21)

> <https://github.com/discourse/discourse/blob/96e3c5e102d539782964025f2ec67f594cbac969/lib/text_cleaner.rb#L75-L83>

Recommend we just use our text cleaner here server side as well to ensure people don’t cheat themselves as well.

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [June 8, 2023, 6:20am UTC](https://meta.discourse.org/t/can-send-empty-chat-messages/265555/5 "2023-06-08T06:20:28Z")

</div>

We have fixed this in this commit:

[https://github.com/discourse/discourse/commit/482ef0782dba6f852862614bf37927ccf70079b3](https://github.com/discourse/discourse/commit/482ef0782dba6f852862614bf37927ccf70079b3)

Thanks!

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [June 8, 2023, 6:20am UTC](https://meta.discourse.org/t/can-send-empty-chat-messages/265555/6 "2023-06-08T06:20:32Z")

</div>


