Commit Graph

100 Commits

Author SHA1 Message Date
CLSMCSMII
7a7f85d1a7 Update UIxMailPartHTMLViewer.m For Thai charset (windows-874)
Fix bug 0006090: Web mail does not display Thai characters in emails sent from Exchange

As advised by qhivert
2025-02-11 11:20:56 +01:00
Hivert Quentin
f8ff98b657 fix(htmlViewer): if the the tag img is not a url but a base64 image, keep it in the preview 2025-02-04 15:28:19 +01:00
smizrahi
41a0f8d9af fix(mail): Fix HTML mail rendering issue 2024-09-04 15:10:05 +02:00
smizrahi
6ac8525bfe feat(mail): Add 'View raw message' mail contextual option. This option open message in a popup without HTML mail CSS content modification. 2024-05-22 10:15:58 +02:00
smizrahi
863280d6ac fix(mail): Remove some css when generating UIxMailPartHTMLViewer. Sometimes, the mail contains SOGo mail template in the content, and broke mail display. 2024-05-10 14:51:09 +02:00
smizrahi
776a798e17 fix(mail): Fix ukrainian encoding issue. Fixes #5702. 2024-02-26 10:09:56 +01:00
smizrahi
f56910db1e fix(mail): Use text/plain fallback if an error occured while parsing html message 2024-02-05 10:50:07 +01:00
smizrahi
5710c4d97e fix(mail): Fix unsupported koi-u encoding 2024-01-22 16:03:39 +01:00
smizrahi
f9fdad251d fix(mail): Removed invalid HTML tags in mail body. Fixes #5755 2023-06-07 14:42:21 +02:00
Francis Lachapelle
3c26e04c52 fix(mail(html)): remove "rel" attribute from sanitized HTML mails
We already add the rel="noopener" to external links, so it's probably
safe to remove it from all tags.
2022-01-13 17:03:57 -05:00
Francis Lachapelle
68608c4e7f fix(mail(js)): remove double quotes prior checking attributes values 2022-01-13 15:01:43 -05:00
Francis Lachapelle
8afc80d82e fix(mail(html)): ban "javascript:" prefix in href, action and formaction 2021-12-01 11:35:05 -05:00
Francis Lachapelle
c4bb0de11e fix(mail): don't lowercase href/action/formaction attribute value
Fixes #5434
2021-11-26 08:34:45 -05:00
Francis Lachapelle
e99090b6b3 fix(mail(html)): ban "javascript:" prefix in href, action and formaction 2021-11-15 17:22:18 -05:00
Francis Lachapelle
a5c315fd17 fix(mail(js)): ban all "on*" events attributes from HTML tags 2021-11-08 13:06:02 -05:00
Francis Lachapelle
e714a3f42b fix(mail(css)): improve CSS sanitization of at-rules
Fixes #5387
2021-09-08 11:38:53 -04:00
Francis Lachapelle
69972f725c fix(mail): remove media event handlers from HTML messages
Fixes #5369
2021-08-02 17:42:02 -04:00
Francis Lachapelle
72321ec545 fix(mail(css)): improve HTML sanitization of background attribute 2021-04-06 16:49:05 -04:00
Francis Lachapelle
d1dbceb407 fix(mail): remove onpointerrawupdate event handler from HTML messages
Fixes #4979
2020-03-06 12:14:46 -05:00
Francis Lachapelle
bc963d53c6 fix(mail): wrap HTML part before re-encoding content
Avoid improper encoding when the HTML part is using an unsupported
encoding by libxml2.
2020-01-30 15:36:16 -05:00
Francis Lachapelle
47075b40a2 fix(mail): wrap HTML part with HTML tags to render all content 2019-12-04 15:45:26 -05:00
Ludovic Marcotte
849c34306a (fix) properly handle Windows-1256 charaset (fixes #4781) 2019-08-01 11:15:17 -04:00
Ludovic Marcotte
4fc515b229 (fix) handle more broken mails (fixes #4513) 2019-06-13 13:54:16 -04:00
Francis Lachapelle
0e918a446a Add rel="noopener" to external links
Fixes #4764
2019-06-10 13:20:44 -04:00
Francis Lachapelle
f8cd3fb29c HTML mail: assume body never ends
Fixes #4492
2018-06-27 15:32:54 -04:00
Francis Lachapelle
fe362b9f49 (css) Improve server-side CSS sanitizer
Remove HTML comment delimiters, remove CSS comments, really remove
at-rules, really add !important suffix.
2018-06-07 12:33:38 -04:00
Francis Lachapelle
bca655ffdd (css) Fix server-side CSS cleaner
Fixes #4366
2018-01-17 13:58:42 -05:00
Ludovic Marcotte
502b59bc08 (feat) handling of encypted HTML parts 2017-12-23 09:02:32 -05:00
Ludovic Marcotte
b6d657d001 (fix) generalized HTML sanitization to avoid encoding issues when replying/forwarding mails
Conflicts:
	SoObjects/Mailer/NSData+Mail.m
2017-10-18 09:41:45 -04:00
Francis Lachapelle
c6dbb88dc1 Simplify sanitization of accepted HTML attributes
This will avoid converting & to an HTML entity.
2017-08-22 10:02:28 -04:00
Francis Lachapelle
b3f541b87e Sanitize whitelisted attributes of HTML tags 2017-06-05 15:14:48 -04:00
Ludovic Marcotte
7582ec8462 Updated comment 2017-04-20 14:35:44 -04:00
Ludovic Marcotte
0091ff749a (fix) handle properly windows-1255 charset (fixes #4124) 2017-04-20 14:29:15 -04:00
Francis Lachapelle
4a21a02f98 Fix rendering of forwarded HTML message with img
Fixes #3981 (cont'd)
2017-01-13 12:23:38 -05:00
Francis Lachapelle
e5d0b0b0ca Fix rendering of forwarded HTML message with img
Fixes #3981 (partially)
2017-01-11 16:08:56 -05:00
Ludovic Marcotte
2a2ebd553e (test) handle sanitization before passing data to libxml 2016-12-06 14:05:27 -05:00
Francis Lachapelle
45290c6414 Improve CSS sanitizer for HTML messages
At-rules are now completely removed. Fixed a possible issue where the
first rule would not be prefixed by our CSS selector.

Fixes #3700
2016-05-27 13:42:44 -04:00
Ludovic Marcotte
74602de1db (fix) make sure found tag is always defined 2016-05-06 08:14:37 -04:00
Patrice Levesque
7c25b53fdf Remove pointless #imports from .m and .h files
This was done with a brute-force approach, ensuring no additional
warnings from GCC 4.9 under x86_64.
2016-02-13 16:11:52 -05:00
Ludovic Marcotte
bdfe95a7fb (fix) fixed wrong comparison of meta vs. META tag in HTML mails
Conflicts:

	NEWS
2015-11-06 09:28:46 -05:00
Euan Thoms
3c62cc744e Stage 1 of clang compiler warning patches. 2015-10-31 14:10:03 +08:00
Ludovic Marcotte
12875539bb (fix) fallback to utf-8/latin1 in rare decoding error cases - this is ugly 2015-07-23 11:21:25 -04:00
Francis Lachapelle
4cc158043e Improve CSS server-side cleaner
Fixes #3040
2015-01-28 16:38:27 -05:00
Ludovic Marcotte
e2bee23021 Avoid unnecessary calls to NSLog 2015-01-22 16:25:16 -05:00
Ludovic Marcotte
08cd080d47 Fixed charset substitution in meta tags 2014-07-21 15:34:56 -04:00
Ludovic Marcotte
333b561a59 Applied patch from bug #2736 2014-06-16 15:30:26 -04:00
Ludovic Marcotte
19a95a1818 Applied fix from #2809 2014-06-10 08:58:44 -04:00
Ludovic Marcotte
619cb2c0ec Fix for bug #2721 2014-04-23 09:22:20 -04:00
Francis Lachapelle
d603a8672e Consider 'background' attribute as unsafe
When loading a message, background attributes will be disabled if the
user as chosen to not automatically load external images.

Fixes #2437
2014-01-09 09:15:49 -05:00
Francis Lachapelle
dc21c723f6 Move method fetchFileAttachmentKeys from category
Moved fetchFileAttachmentKeys from SOGoDraftObjectExtensions to
SOGoDraftObject. Renamed fetchAttachmentIds to fetchFileAttachmentIds
for consistency.
2013-12-20 15:20:16 -05:00