# 标题中最大表情符号数设为 0 - 与表情符号快捷键冲突

**URL:** <https://meta.discourse.org/t/max-emojis-in-title-set-to-0-conflicting-with-emoji-shortcuts/98368>\
**Category:** UX\
**Created:** [2018年九月29日 22:17 UTC](https://meta.discourse.org/t/max-emojis-in-title-set-to-0-conflicting-with-emoji-shortcuts/98368 "2018-09-29T22:17:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bts](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bts/32/184556_2.png) [@bts](https://meta.discourse.org/u/bts)\
**Post date:** [2018年九月29日 22:17 UTC](https://meta.discourse.org/t/max-emojis-in-title-set-to-0-conflicting-with-emoji-shortcuts/98368/1 "2018-09-29T22:17:32Z")

</div>

不确定这是否算作一个错误，这是一个非常小的问题，但值得查看一下：

在我们的论坛中，`max emojis in title`（标题中最大表情符号数量）设置为 `0`，但我注意到在新帖子中仍然显示了一个表情符号。查看实际发布的标题文本，我看到用户输入了 `:)`，因此它一定是被自动转换了。

我猜测这与 `enable emoji shortcuts`（启用表情符号快捷方式）设置存在冲突，并且从表情符号到表情符号的转换可能需要限制在标题中，以考虑 `max emojis in title` 设置。

---

<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:** [2018年十月2日 01:41 UTC](https://meta.discourse.org/t/max-emojis-in-title-set-to-0-conflicting-with-emoji-shortcuts/98368/3 "2018-10-02T01:41:40Z")

</div>

I am not sure about auto conversion of shortcuts in title at all. But the failure mode here does not feel right regardless.

We should either say:

`You are not allowed to include any emojis in your title`

Or special case it so when this is 0 we simply bypass all emoji unescape for titles.

My vote here:

1. If it is set to 0, we special case it so there is no emoji unescape for titles, do no emoji count validation on save.

2. We confirm that we properly count `:)` conversions to emoji so you can not bypass default of 1 with `:) :) :)`

@techAPJ not urgent to sort this out but please add to your list.

---

<div class="post-metadata">

**Author:** ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)\
**Post date:** [2018年十月22日 09:00 UTC](https://meta.discourse.org/t/max-emojis-in-title-set-to-0-conflicting-with-emoji-shortcuts/98368/4 "2018-10-22T09:00:13Z")

</div>

Special casing emoji unescape for titles required changes in many places in our codebase so for now I improved emoji validation so we properly count emoji shortcuts `:)`, and improved the error message when emoji is disabled in titles.

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