summaryrefslogtreecommitdiffstats
path: root/web/react/components/rhs_root_post.jsx
diff options
context:
space:
mode:
authorhmhealey <harrisonmhealey@gmail.com>2015-09-14 11:48:07 -0400
committerhmhealey <harrisonmhealey@gmail.com>2015-09-14 12:22:02 -0400
commit15aa853da5f6be8a95970d73a700afc6b626c572 (patch)
tree76295c2eca6a3218466292127e68626adfdf6a76 /web/react/components/rhs_root_post.jsx
parent3e3b52554a49b8c2d9c242061bfc82be2948b645 (diff)
downloadchat-15aa853da5f6be8a95970d73a700afc6b626c572.tar.gz
chat-15aa853da5f6be8a95970d73a700afc6b626c572.tar.bz2
chat-15aa853da5f6be8a95970d73a700afc6b626c572.zip
Removed all calls to textToJsx and replaced them with calls to TextFormatting
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>