Start converting IDN emails
This commit is contained in:
parent
2d2217b677
commit
5133458d30
3 changed files with 12 additions and 1 deletions
|
|
@ -49,6 +49,7 @@ The default for including jQuery from a CDN has changed. If you want to continue
|
|||
* Handle long URLs and titles in OpenGraph descriptions [#5208](https://github.com/diaspora/diaspora/pull/5208)
|
||||
* Fix deformed getting started popover [#5227](https://github.com/diaspora/diaspora/pull/5227)
|
||||
* Use correct locale for invitation subject [#5232](https://github.com/diaspora/diaspora/pull/5232)
|
||||
* Initial support for IDN emails
|
||||
|
||||
## Features
|
||||
* Don't pull jQuery from a CDN by default [#5105](https://github.com/diaspora/diaspora/pull/5105)
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ module NotificationMailers
|
|||
end
|
||||
|
||||
def name_and_address(name, email)
|
||||
address = Mail::Address.new email
|
||||
address = Mail::Address.new Addressable::IDNA.to_ascii(email)
|
||||
address.display_name = name
|
||||
address.format
|
||||
end
|
||||
|
|
|
|||
|
|
@ -326,4 +326,14 @@ describe Notifier, :type => :mailer do
|
|||
expect(mail.body.encoded).to match "<p><a href=\"http://localhost:9887/tags/welcome\">#Welcome</a> to bureaucracy!</p>"
|
||||
end
|
||||
end
|
||||
|
||||
describe "base" do
|
||||
it "handles idn addresses" do
|
||||
# user = FactoryGirl.create(:user, email: "ŧoo@ŧexample.com")
|
||||
bob.update_attribute(:email, "ŧoo@ŧexample.com")
|
||||
expect {
|
||||
Notifier.started_sharing(bob.id, person.id)
|
||||
}.to_not raise_error
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue