|
|
@ -93,7 +93,7 @@ class StatusContent extends React.PureComponent {
|
|
|
|
const { hidden } = this.state;
|
|
|
|
const { hidden } = this.state;
|
|
|
|
|
|
|
|
|
|
|
|
const content = { __html: emojify(status.get('content')) };
|
|
|
|
const content = { __html: emojify(status.get('content')) };
|
|
|
|
const spoilerContent = { __html: emojify(status.get('spoiler_text', '')) };
|
|
|
|
const spoilerContent = { __html: emojify(escapeTextContentForBrowser(status.get('spoiler_text', ''))) };
|
|
|
|
const directionStyle = { direction: 'ltr' };
|
|
|
|
const directionStyle = { direction: 'ltr' };
|
|
|
|
|
|
|
|
|
|
|
|
if (isRtl(status.get('content'))) {
|
|
|
|
if (isRtl(status.get('content'))) {
|
|
|
@ -116,19 +116,16 @@ class StatusContent extends React.PureComponent {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<div
|
|
|
|
<div className='status__content' ref={this.setRef} onMouseDown={this.handleMouseDown} onMouseUp={this.handleMouseUp}>
|
|
|
|
ref={this.setRef}
|
|
|
|
|
|
|
|
className='status__content'
|
|
|
|
|
|
|
|
onMouseDown={this.handleMouseDown}
|
|
|
|
|
|
|
|
onMouseUp={this.handleMouseUp}
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<p style={{ marginBottom: hidden && status.get('mentions').size === 0 ? '0px' : '' }} >
|
|
|
|
<p style={{ marginBottom: hidden && status.get('mentions').size === 0 ? '0px' : '' }} >
|
|
|
|
<span dangerouslySetInnerHTML={spoilerContent} /> <button tabIndex='0' className='status__content__spoiler-link' onClick={this.handleSpoilerClick}>{toggleText}</button>
|
|
|
|
<span dangerouslySetInnerHTML={spoilerContent} /> <button tabIndex='0' className='status__content__spoiler-link' onClick={this.handleSpoilerClick}>{toggleText}</button>
|
|
|
|
|
|
|
|
|
|
|
|
</p>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
|
|
{mentionsPlaceholder}
|
|
|
|
{mentionsPlaceholder}
|
|
|
|
|
|
|
|
|
|
|
|
<div style={{ display: hidden ? 'none' : 'block', ...directionStyle }} dangerouslySetInnerHTML={content} />
|
|
|
|
<div style={{ display: hidden ? 'none' : 'block', ...directionStyle }} dangerouslySetInnerHTML={content} />
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
);
|
|
|
|
} else if (this.props.onClick) {
|
|
|
|
} else if (this.props.onClick) {
|
|
|
|