aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'vnext/src/components')
-rw-r--r--vnext/src/components/Message.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/vnext/src/components/Message.js b/vnext/src/components/Message.js
index d1a9c51f..53c2a033 100644
--- a/vnext/src/components/Message.js
+++ b/vnext/src/components/Message.js
@@ -1,12 +1,13 @@
import React from 'react';
import PropTypes from 'prop-types';
-import ReactMarkdown from 'react-markdown';
import moment from 'moment';
import { UserType } from './Types';
import Icon from './Icon';
import Avatar from './Avatar';
+import { format } from '../utils/embed';
+
export default function Message(props) {
const msg = props.data;
const visitor = props.visitor;
@@ -29,7 +30,7 @@ export default function Message(props) {
<Tags data={msg.tags || []} />
</div>
</header>
- <ReactMarkdown itemProp="description" source={msg.body} />
+ <p itemProp="description" dangerouslySetInnerHTML={{ __html: format(msg.body, msg.mid, (msg.tags || []).indexOf('code') >= 0) }}></p>
{msg.photo &&
<p className="ir"><a href={`//i.juick.com/p/${msg.mid}.${msg.attach}`} data-fname={`${msg.mid}.${msg.attach}`}>
<img itemProp="image" src={`//i.juick.com/p/${msg.mid}.${msg.attach}`} alt="" /></a>