FIX: broken emojis in topic excerpt (#11667)

When a post is truncated into the excerpt, sometimes we are breaking code of emoji
This commit is contained in:
Krzysztof Kotlarek
2021-01-11 10:40:41 +11:00
committed by GitHub
parent 2e24254773
commit 7f78b6ec10
3 changed files with 29 additions and 2 deletions

View File

@@ -486,7 +486,7 @@ class Post < ActiveRecord::Base
end
def excerpt_for_topic
Post.excerpt(cooked, SiteSetting.topic_excerpt_maxlength, strip_links: true, strip_images: true, post: self)
Post.excerpt(cooked, SiteSetting.topic_excerpt_maxlength, strip_links: true, strip_images: true, strip_truncated_emoji_code: true, post: self)
end
def is_first_post?