When transmitting data in a HTML-encoded element like <content type="html" />,
relying on newlines being preserved is not wise, since HTML by itself
does not care for newlines - it cares for <p> and <br>
Additional fix: reset NSFW toggle after sending toot
const { status } = this.props;
const { hidden } = this.state;
- const content = { __html: emojify(status.get('content')).replace(/\n/g, '') };
+ const content = { __html: emojify(status.get('content')) };
const spoilerContent = { __html: emojify(escapeTextContentForBrowser(status.get('spoiler_text', ''))) };
const directionStyle = { direction: 'ltr' };
map.set('is_submitting', false);
map.set('in_reply_to', null);
map.set('privacy', state.get('default_privacy'));
+ map.set('sensitive', false);
map.update('media_attachments', list => list.clear());
});
};
html = status.text
html = encode(html)
html = simple_format(html, {}, sanitize: false)
+ html = html.gsub(/\n/, '')
html = link_urls(html)
html = link_mentions(html, status.mentions)
html = link_hashtags(html)