diff --git a/lib/html_sanitizer.rb b/lib/html_sanitizer.rb
index c4975898b..569b6a674 100644
--- a/lib/html_sanitizer.rb
+++ b/lib/html_sanitizer.rb
@@ -387,7 +387,7 @@ cleanup html string:
end
uri.to_s
- rescue URI::Error
+ rescue
url
end
diff --git a/test/data/mail/mail075.box b/test/data/mail/mail075.box
new file mode 100644
index 000000000..39ab259be
--- /dev/null
+++ b/test/data/mail/mail075.box
@@ -0,0 +1,17 @@
+From: =?Windows-1252?Q?Hans_B=C4KO?= =?iso-8859-15?q?Sch=F6nland?=
+To: =?iso-8859-2?Q?Namedy=F1ski?= (hans@example.com)
+Subject: test email
+Content-Type: text/html; charset="iso-8859-15"; format=flowed
+
+
+
+test 123
+
+Demande :
+
Bonjour
+Je viens de vous appeler pour demander, si possible, un alignement de votre prix avec un autre site.
+Si c'est possible je pourrai valider ma commande de 2 articles.
+merci
+https://example.com/offer/buy/1842322378/cpl1842322379_ALL/slamp-murale-applique-mirage-prisme-example.html?t=3D180116&gclid=3DEAIaIQobChMI89_U0eXL3QIV6xXTCh1SVQFGEAkYAyABEgIXNPD_BwE#bbaid=3D2592593227&sort=3D0&xtatc=3DPUB-%5Bggp%5D-%5BMaison%5D-%5Bluminaire%5D-%5B1842322379%5D-%5Bneuf%5D-%5BMyAreaDesign%5D&ptnrid=3Dpt%7C79136332043%7Cc%7C65341408643%7C1842322379&ptnrid=3DszR8w9fp2_dc|pcrid|65341408643|pkw||pmt|&ja2=3Dtsid:67590|cid:351274283|agid:16928404283|tid:pla-79136332043|crid:65341408643|nw:g|rnd:17449719988904880623|dvc:c|adp:1o3
+
+
diff --git a/test/data/mail/mail075.yml b/test/data/mail/mail075.yml
new file mode 100644
index 000000000..0b96703e5
--- /dev/null
+++ b/test/data/mail/mail075.yml
@@ -0,0 +1,31 @@
+--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess
+from: '"Hans BÄKOSchönland" '
+from_email: me@bogen.net
+from_display_name: Hans BÄKOSchönland
+to: Namedyński (hans@example.com)
+subject: test email
+body: |-
+ test 123
Demande :
+
Bonjour Je viens de vous appeler pour demander, si possible, un alignement de votre prix avec un autre site. Si c'est possible je pourrai valider ma commande de 2 articles. merci https://example.com/offer/buy/1842322378/cpl1842322379_ALL/slamp-murale-applique-mirage-prisme-example.html?t=3D180116&gclid=3DEAIaIQobChMI89_U0eXL3QIV6xXTCh1SVQFGEAkYAyABEgIXNPD_BwE#bbaid=3D2592593227&sort=3D0&xtatc=3DPUB-%5Bggp%5D-%5BMaison%5D-%5Bluminaire%5D-%5B1842322379%5D-%5Bneuf%5D-%5BMyAreaDesign%5D&ptnrid=3Dpt%7C79136332043%7Cc%7C65341408643%7C1842322379&ptnrid=3DszR8w9fp2_dc|pcrid|65341408643|pkw||pmt|&ja2=3Dtsid:67590|cid:351274283|agid:16928404283|tid:pla-79136332043|crid:65341408643|nw:g|rnd:17449719988904880623|dvc:c|adp:1o3
+content_type: text/html
+attachments:
+- !ruby/hash:ActiveSupport::HashWithIndifferentAccess
+ data: |
+
+
+ test 123
+
+ Demande :
+
Bonjour
+ Je viens de vous appeler pour demander, si possible, un alignement de votre prix avec un autre site.
+ Si c'est possible je pourrai valider ma commande de 2 articles.
+ merci
+ https://example.com/offer/buy/1842322378/cpl1842322379_ALL/slamp-murale-applique-mirage-prisme-example.html?t=3D180116&gclid=3DEAIaIQobChMI89_U0eXL3QIV6xXTCh1SVQFGEAkYAyABEgIXNPD_BwE#bbaid=3D2592593227&sort=3D0&xtatc=3DPUB-%5Bggp%5D-%5BMaison%5D-%5Bluminaire%5D-%5B1842322379%5D-%5Bneuf%5D-%5BMyAreaDesign%5D&ptnrid=3Dpt%7C79136332043%7Cc%7C65341408643%7C1842322379&ptnrid=3DszR8w9fp2_dc|pcrid|65341408643|pkw||pmt|&ja2=3Dtsid:67590|cid:351274283|agid:16928404283|tid:pla-79136332043|crid:65341408643|nw:g|rnd:17449719988904880623|dvc:c|adp:1o3
+
+
+ filename: message.html
+ preferences: !ruby/hash:ActiveSupport::HashWithIndifferentAccess
+ content-alternative: true
+ original-format: true
+ Mime-Type: text/html
+ Charset: iso-8859-15