Skip to content
Extraits de code Groupes Projets
Valider 5133458d rédigé par Jonne Haß's avatar Jonne Haß
Parcourir les fichiers

Start converting IDN emails

parent 2d2217b6
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -49,6 +49,7 @@ The default for including jQuery from a CDN has changed. If you want to continue ...@@ -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) * 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) * 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) * Use correct locale for invitation subject [#5232](https://github.com/diaspora/diaspora/pull/5232)
* Initial support for IDN emails
## Features ## Features
* Don't pull jQuery from a CDN by default [#5105](https://github.com/diaspora/diaspora/pull/5105) * Don't pull jQuery from a CDN by default [#5105](https://github.com/diaspora/diaspora/pull/5105)
......
...@@ -23,7 +23,7 @@ module NotificationMailers ...@@ -23,7 +23,7 @@ module NotificationMailers
end end
def name_and_address(name, email) 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.display_name = name
address.format address.format
end end
......
...@@ -326,4 +326,14 @@ describe Notifier, :type => :mailer do ...@@ -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>" expect(mail.body.encoded).to match "<p><a href=\"http://localhost:9887/tags/welcome\">#Welcome</a> to bureaucracy!</p>"
end end
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 end
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter