summaryrefslogtreecommitdiffstats
path: root/web/react/components/post_body.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/post_body.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/post_body.jsx')
-rw-r--r--web/react/components/post_body.jsx8
1 files changed, 6 insertions, 2 deletions
diff --git a/web/react/components/post_body.jsx b/web/react/components/post_body.jsx
index d9b8f20ce..df4ed3d57 100644
--- a/web/react/components/post_body.jsx
+++ b/web/react/components/post_body.jsx
@@ -5,6 +5,7 @@ const FileAttachmentList = require('./file_attachment_list.jsx');
const UserStore = require('../stores/user_store.jsx');
const Utils = require('../utils/utils.jsx');
const Constants = require('../utils/constants.jsx');
+const TextFormatting = require('../utils/text_formatting.jsx');
const twemoji = require('twemoji');
export default class PostBody extends React.Component {
@@ -33,7 +34,6 @@ export default class PostBody extends React.Component {
const post = this.props.post;
const filenames = this.props.post.filenames;
const parentPost = this.props.parentPost;
- const inner = Utils.textToJsx(this.state.message);
let comment = '';
let postClass = '';
@@ -135,7 +135,11 @@ export default class PostBody extends React.Component {
key={`${post.id}_message`}
className={postClass}
>
- {loading}<span>{inner}</span>
+ {loading}
+ <span
+ onClick={TextFormatting.handleClick}
+ dangerouslySetInnerHTML={{__html: TextFormatting.formatText(this.state.message)}}
+ />
</p>
{fileAttachmentHolder}
{embed}