From e832e937c51ca032edff77a47b87b04083fd6910 Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Fri, 10 Jan 2014 16:44:02 -0500 Subject: [PATCH] Make emojis be 20px tall in missed message emails. (imported from commit 687b099f19d69f41876571c08a0627f061067f86) --- zerver/lib/actions.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/zerver/lib/actions.py b/zerver/lib/actions.py index c39a6140dc..69553476b6 100644 --- a/zerver/lib/actions.py +++ b/zerver/lib/actions.py @@ -2019,6 +2019,9 @@ def build_message_list(user_profile, messages): # with a simple hyperlink. return re.sub(r"\[(\S*)\]\((\S*)\)", r"\2", content) + def fix_emoji_sizes(html): + return html.replace(' class="emoji"', ' height="20px"') + def build_message_payload(message): plain = message.content plain = fix_plaintext_image_urls(plain) @@ -2026,6 +2029,8 @@ def build_message_list(user_profile, messages): html = message.rendered_content html = relative_to_full_url(html) + html = fix_emoji_sizes(html) + return {'plain': plain, 'html': html} def build_sender_payload(message):