mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: update mail gem to fix UTF-8 parsing issue
This commit is contained in:
parent
416c79daa5
commit
ddb092f397
2
Gemfile
2
Gemfile
@ -24,7 +24,7 @@ else
|
|||||||
gem 'seed-fu'
|
gem 'seed-fu'
|
||||||
end
|
end
|
||||||
|
|
||||||
gem 'mail', require: false
|
gem 'mail', '2.7.1.rc1', require: false
|
||||||
gem 'mini_mime'
|
gem 'mini_mime'
|
||||||
gem 'mini_suffix'
|
gem 'mini_suffix'
|
||||||
|
|
||||||
|
@ -161,14 +161,14 @@ GEM
|
|||||||
crass (~> 1.0.2)
|
crass (~> 1.0.2)
|
||||||
nokogiri (>= 1.5.9)
|
nokogiri (>= 1.5.9)
|
||||||
lru_redux (1.1.0)
|
lru_redux (1.1.0)
|
||||||
mail (2.7.0)
|
mail (2.7.1.rc1)
|
||||||
mini_mime (>= 0.1.1)
|
mini_mime (>= 0.1.1)
|
||||||
memory_profiler (0.9.10)
|
memory_profiler (0.9.10)
|
||||||
message_bus (2.1.4)
|
message_bus (2.1.4)
|
||||||
rack (>= 1.1.3)
|
rack (>= 1.1.3)
|
||||||
metaclass (0.0.4)
|
metaclass (0.0.4)
|
||||||
method_source (0.8.2)
|
method_source (0.8.2)
|
||||||
mini_mime (0.1.3)
|
mini_mime (1.0.0)
|
||||||
mini_portile2 (2.3.0)
|
mini_portile2 (2.3.0)
|
||||||
mini_racer (0.1.15)
|
mini_racer (0.1.15)
|
||||||
libv8 (~> 6.3)
|
libv8 (~> 6.3)
|
||||||
@ -436,7 +436,7 @@ DEPENDENCIES
|
|||||||
logstash-logger
|
logstash-logger
|
||||||
logster
|
logster
|
||||||
lru_redux
|
lru_redux
|
||||||
mail
|
mail (= 2.7.1.rc1)
|
||||||
memory_profiler
|
memory_profiler
|
||||||
message_bus
|
message_bus
|
||||||
mini_mime
|
mini_mime
|
||||||
|
@ -183,7 +183,7 @@ describe Email::Receiver do
|
|||||||
|
|
||||||
it "works" do
|
it "works" do
|
||||||
expect { process(:text_reply) }.to change { topic.posts.count }
|
expect { process(:text_reply) }.to change { topic.posts.count }
|
||||||
expect(topic.posts.last.raw).to eq("This is a text reply :)")
|
expect(topic.posts.last.raw).to eq("This is a text reply :)\n\nEmail parsing should not break because of a UTF-8 character: ’")
|
||||||
expect(topic.posts.last.via_email).to eq(true)
|
expect(topic.posts.last.via_email).to eq(true)
|
||||||
expect(topic.posts.last.cooked).not_to match(/<br/)
|
expect(topic.posts.last.cooked).not_to match(/<br/)
|
||||||
|
|
||||||
@ -233,7 +233,7 @@ describe Email::Receiver do
|
|||||||
it "uses text when prefer_html site setting is enabled but no html is available" do
|
it "uses text when prefer_html site setting is enabled but no html is available" do
|
||||||
SiteSetting.incoming_email_prefer_html = true
|
SiteSetting.incoming_email_prefer_html = true
|
||||||
expect { process(:text_reply) }.to change { topic.posts.count }
|
expect { process(:text_reply) }.to change { topic.posts.count }
|
||||||
expect(topic.posts.last.raw).to eq("This is a text reply :)")
|
expect(topic.posts.last.raw).to eq("This is a text reply :)\n\nEmail parsing should not break because of a UTF-8 character: ’")
|
||||||
end
|
end
|
||||||
|
|
||||||
it "removes the 'on <date>, <contact> wrote' quoting line" do
|
it "removes the 'on <date>, <contact> wrote' quoting line" do
|
||||||
|
2
spec/fixtures/emails/forwarded_email_3.eml
vendored
2
spec/fixtures/emails/forwarded_email_3.eml
vendored
@ -9,7 +9,7 @@ Subject: Fwd: Ça Discourse ?
|
|||||||
Objet: Ça Discourse ?
|
Objet: Ça Discourse ?
|
||||||
Date: 2017-01-04 11:27
|
Date: 2017-01-04 11:27
|
||||||
De: Un Français <un@francais.fr>
|
De: Un Français <un@francais.fr>
|
||||||
À: ba@bar.com
|
A: ba@bar.com
|
||||||
|
|
||||||
Bonjour,
|
Bonjour,
|
||||||
|
|
||||||
|
4
spec/fixtures/emails/text_reply.eml
vendored
4
spec/fixtures/emails/text_reply.eml
vendored
@ -3,8 +3,8 @@ From: Foo Bar <discourse@bar.com>
|
|||||||
To: reply+4f97315cc828096c9cb34c6f1a0d6fe8@bar.com
|
To: reply+4f97315cc828096c9cb34c6f1a0d6fe8@bar.com
|
||||||
Date: Fri, 15 Jan 2016 00:12:43 +0100
|
Date: Fri, 15 Jan 2016 00:12:43 +0100
|
||||||
Message-ID: <15@foo.bar.mail>
|
Message-ID: <15@foo.bar.mail>
|
||||||
Mime-Version: 1.0
|
|
||||||
Content-Type: text/plain
|
Content-Type: text/plain
|
||||||
Content-Transfer-Encoding: 7bit
|
|
||||||
|
|
||||||
This is a text reply :)
|
This is a text reply :)
|
||||||
|
|
||||||
|
Email parsing should not break because of a UTF-8 character: ’
|
||||||
|
Loading…
Reference in New Issue
Block a user