diff options
author | Corey Hulen <corey@hulen.com> | 2015-07-13 08:42:32 -0800 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2015-07-13 08:42:32 -0800 |
commit | d2602f540c953ffea2e622ed4c699ab44eadd087 (patch) | |
tree | e05a55c3617d13910b9ff10237ebe36fd5fcd56c /web/react | |
parent | 6447af758cd27216d036e06b385770999dc213b1 (diff) | |
parent | dcea1de00661a9fba9129a35b4c6451234a18d9a (diff) | |
download | chat-d2602f540c953ffea2e622ed4c699ab44eadd087.tar.gz chat-d2602f540c953ffea2e622ed4c699ab44eadd087.tar.bz2 chat-d2602f540c953ffea2e622ed4c699ab44eadd087.zip |
Merge pull request #166 from rgarmsen2295/mm-1526
MM-1526 Desktop notifications no longer render carriage returns
Diffstat (limited to 'web/react')
-rw-r--r-- | web/react/components/sidebar.jsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/web/react/components/sidebar.jsx b/web/react/components/sidebar.jsx index 2095978e8..934a4d22a 100644 --- a/web/react/components/sidebar.jsx +++ b/web/react/components/sidebar.jsx @@ -249,7 +249,7 @@ var SidebarLoggedIn = React.createClass({ var repRegex = new RegExp("<br>", "g"); var post = JSON.parse(msg.props.post); - var msg = post.message.replace(repRegex, "\n").split("\n")[0].replace("<mention>", "").replace("</mention>", ""); + var msg = post.message.replace(repRegex, "\n").replace(/\n+/g, " ").replace("<mention>", "").replace("</mention>", ""); if (msg.length > 50) { msg = msg.substring(0,49) + "..."; } |