From 0ece72dab06c39074f7764ec82697b1ebdb65123 Mon Sep 17 00:00:00 2001 From: Rachel Date: Wed, 12 Apr 2017 16:00:25 -0700 Subject: [PATCH] Fix status whitespace --- app/assets/javascripts/components/components/status_content.jsx | 2 +- app/lib/formatter.rb | 1 - config/application.rb | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/components/components/status_content.jsx b/app/assets/javascripts/components/components/status_content.jsx index 9cf03bb325..c7eefcaf50 100644 --- a/app/assets/javascripts/components/components/status_content.jsx +++ b/app/assets/javascripts/components/components/status_content.jsx @@ -92,7 +92,7 @@ const StatusContent = React.createClass({ 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' }; diff --git a/app/lib/formatter.rb b/app/lib/formatter.rb index b6d371ed2d..0c39bbffb1 100644 --- a/app/lib/formatter.rb +++ b/app/lib/formatter.rb @@ -14,7 +14,6 @@ class Formatter html = status.text html = encode(html) - html = simple_format(html, {}, sanitize: false) html = link_urls(html) html = link_mentions(html, status.mentions) html = link_hashtags(html) diff --git a/config/application.rb b/config/application.rb index 2c720474a0..00bee6843c 100644 --- a/config/application.rb +++ b/config/application.rb @@ -61,6 +61,7 @@ module Mastodon config.middleware.use Rack::Attack config.middleware.use Rack::Deflater + config.browserify_rails.source_map_environments << 'development' config.browserify_rails.commandline_options = '--transform [ babelify --presets [ es2015 react ] ] --extension=".jsx"' config.to_prepare do