diff options
author | Vitaly Takmazov | 2018-12-17 12:24:52 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2023-01-13 10:37:54 +0300 |
commit | f66ff6fe82c575a5e71678234c9518a6a537927c (patch) | |
tree | f2397897df0916f50dde996bd0b44d4f30bb6562 /vnext/src/components/Thread.js | |
parent | b207f36c2efc38376713b540c2beb1df57dec57f (diff) |
Anonymous comments
Diffstat (limited to 'vnext/src/components/Thread.js')
-rw-r--r-- | vnext/src/components/Thread.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/vnext/src/components/Thread.js b/vnext/src/components/Thread.js index b824c0ed..cf7291a8 100644 --- a/vnext/src/components/Thread.js +++ b/vnext/src/components/Thread.js @@ -41,7 +41,7 @@ export default class Thread extends React.Component { if (this.props.visitor && this.props.visitor.hash) { params.hash = this.props.visitor.hash; } - getMessages('/thread', params) + getMessages('/api/thread', params) .then(response => { let msg = response.data.shift(); this.setState({ @@ -111,7 +111,13 @@ export default class Thread extends React.Component { </div> </Avatar> </div> - <div className="msg-txt"><p dangerouslySetInnerHTML={{ __html: format(msg.body, msg.mid, (msg.tags || []).indexOf('code') >= 0) }}></p></div> + { + msg.html ? <div className="msg-txt" dangerouslySetInnerHTML={{__html: msg.body }}/> + : + <div className="msg-txt"> + <p dangerouslySetInnerHTML={{ __html: format(msg.body, msg.mid, (msg.tags || []).indexOf('code') >= 0) }} /> + </div> + } { msg.photo && <p className="ir"><a href={`//i.juick.com/p/${msg.mid}-${msg.rid}.${msg.attach}`} data-fname={`${msg.mid}-${msg.rid}.${msg.attach}`}> |