diff options
| author | jbm-odoo <jbm@odoo.com> | 2019-11-22 10:43:22 +0000 |
|---|---|---|
| committer | fw-bot <otis@odoo.com> | 2019-11-22 16:46:10 +0000 |
| commit | 77e4c64fd7bf4b901d068d71f027f1069c652135 (patch) | |
| tree | 04f92e4cd730ef2b66b1b3bd934c08f473f2669e /addons/mail | |
| parent | 5e9a4c39bd04be6a842f6a09552ad4698326479f (diff) | |
[FIX] mail: Limit emojis quantity
If the user put more than 200 emojis, we didn't replace emoji with
image. But due to a typo in the code, this mechanism broke the
discuss application.
closes odoo/odoo#40734
X-original-commit: 0877cb6c84c768bd9fad46fa6f959635bb2353a5
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Diffstat (limited to 'addons/mail')
| -rw-r--r-- | addons/mail/static/src/js/models/messages/message.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/mail/static/src/js/models/messages/message.js b/addons/mail/static/src/js/models/messages/message.js index 8327f4011fd..ddc6230c77c 100644 --- a/addons/mail/static/src/js/models/messages/message.js +++ b/addons/mail/static/src/js/models/messages/message.js @@ -604,7 +604,7 @@ var Message = AbstractMessage.extend(Mixins.EventDispatcherMixin, ServicesMixin _.each(emojis, function (emoji) { var unicode = emoji.unicode; var regexp = new RegExp("(?:^|\\s|<[a-z]*>)(" + unicode + ")(?=\\s|$|</[a-z]*>)", 'g'); - var originalBody = self.body; + var originalBody = self._body; self._body = self._body.replace(regexp, ' <span class="o_mail_emoji">' + unicode + '</span> '); // Idiot-proof limit. If the user had the amazing idea of |
