summaryrefslogtreecommitdiffstats
path: root/web/react/components/rhs_root_post.jsx
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2015-09-15 08:20:01 -0400
committerJoram Wilander <jwawilander@gmail.com>2015-09-15 08:20:01 -0400
commit4a9984d166ff939129740f69e1bd382769a954bb (patch)
tree1e035ed97b937066f27c72899c240689efe58e66 /web/react/components/rhs_root_post.jsx
parentbfebb41bc0c0a1c5f481617f912bdf6dd483c341 (diff)
parent4c9ae22b6207c477b92737f4e79901c7366a4792 (diff)
downloadchat-4a9984d166ff939129740f69e1bd382769a954bb.tar.gz
chat-4a9984d166ff939129740f69e1bd382769a954bb.tar.bz2
chat-4a9984d166ff939129740f69e1bd382769a954bb.zip
Merge pull request #676 from hmhealey/mm1900b
MM-1900 Removed textToJsx
Diffstat (limited to 'web/react/components/rhs_root_post.jsx')
-rw-r--r--web/react/components/rhs_root_post.jsx7
1 files changed, 5 insertions, 2 deletions
diff --git a/web/react/components/rhs_root_post.jsx b/web/react/components/rhs_root_post.jsx
index 83b57b955..85755a85c 100644
--- a/web/react/components/rhs_root_post.jsx
+++ b/web/react/components/rhs_root_post.jsx
@@ -4,6 +4,7 @@
var ChannelStore = require('../stores/channel_store.jsx');
var UserProfile = require('./user_profile.jsx');
var UserStore = require('../stores/user_store.jsx');
+var TextFormatting = require('../utils/text_formatting.jsx');
var utils = require('../utils/utils.jsx');
var FileAttachmentList = require('./file_attachment_list.jsx');
var twemoji = require('twemoji');
@@ -35,7 +36,6 @@ export default class RhsRootPost extends React.Component {
}
render() {
var post = this.props.post;
- var message = utils.textToJsx(post.message);
var isOwner = UserStore.getCurrentId() === post.user_id;
var timestamp = UserStore.getProfile(post.user_id).update_at;
var channel = ChannelStore.get(post.channel_id);
@@ -140,7 +140,10 @@ export default class RhsRootPost extends React.Component {
</li>
</ul>
<div className='post-body'>
- <p>{message}</p>
+ <p
+ onClick={TextFormatting.handleClick}
+ dangerouslySetInnerHTML={{__html: TextFormatting.formatText(post.message)}}
+ />
{fileAttachment}
</div>
</div>