Merge pull request #10021 from colinux/fix-email-subject-double-encode
ETQ usager je dois voir de vraies apostrophes à la place de `'` dans les sujets d'email
This commit is contained in:
commit
1671a783a2
2 changed files with 3 additions and 3 deletions
|
@ -10,7 +10,7 @@ module MailTemplateConcern
|
|||
end
|
||||
|
||||
def subject_for_dossier(dossier)
|
||||
replace_tags(subject, dossier).presence || replace_tags(self.class::DEFAULT_SUBJECT, dossier)
|
||||
replace_tags(subject, dossier, escape: false).presence || replace_tags(self.class::DEFAULT_SUBJECT, dossier, escape: false)
|
||||
end
|
||||
|
||||
def body_for_dossier(dossier)
|
||||
|
|
|
@ -140,9 +140,9 @@ RSpec.describe NotificationMailer, type: :mailer do
|
|||
|
||||
subject(:mail) { described_class.send_en_instruction_notification(dossier) }
|
||||
|
||||
context "subject has a special character" do
|
||||
context "subject has a special character should not be escaped" do
|
||||
let(:subject) { '--libellé démarche--' }
|
||||
it { expect(mail.subject).to eq("Mon titre avec l'apostrophe") }
|
||||
it { expect(mail.subject).to eq("Mon titre avec l'apostrophe") }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue