Commit Graph

27 Commits

Author SHA1 Message Date
Thibault Delavallée 983d5eb9fa [FIX] tools: html_email_clean: fixed regex for
signature that was buggy when having dots.
Also fixed read more link addition.

Added test case that triggered the error.

bzr revid: tde@openerp.com-20131016103516-w44j6r5oaljpwvmx
2013-10-16 12:35:16 +02:00
Thibault Delavallée e3175e482f [TESTS] tools: mail: added some tests + some cleaning in tests
bzr revid: tde@openerp.com-20130808132258-01sv0w1hrgtdyogq
2013-08-08 15:22:58 +02:00
Thibault Delavallée 4f7afae100 [MERGE] Sync with trunk
bzr revid: tde@openerp.com-20130717074450-puhtirdoqswf55pl
2013-07-17 09:44:50 +02:00
Olivier Dony e608027256 [FIX] openerp/tests/test_mail.py marked executable as it should
lp bug: https://launchpad.net/bugs/993414 fixed

bzr revid: odo@openerp.com-20130517102933-u1u4n2ad5jxnndw5
2013-05-17 12:29:33 +02:00
Thibault Delavallée ccbb8e09a6 [REF] html_email_clean: refactored the algorithm to clean it, specifically about truncature. Now add classes to node when not removing them, to be managed by the web client.
bzr revid: tde@openerp.com-20130425104301-e7mv9o4pcjx6k2cn
2013-04-25 12:43:01 +02:00
Thibault Delavallée f97bd8bd63 [REF] html_email_clean: refactoring of the algorithm, now better taking into account hotmail / msoffice emails. Added tests.
bzr revid: tde@openerp.com-20130423144903-he22jz9zs6nc6dsd
2013-04-23 16:49:03 +02:00
Christophe Matthieu 21c5425d89 [IMP] mail_sanitize: simplification of the regular expression
bzr revid: chm@openerp.com-20130102162544-jfwdfqx2ruf0x1q2
2013-01-02 17:25:44 +01:00
Christophe Matthieu 6a07b69889 [IMP] html_sanitize: test with assertIn
bzr revid: chm@openerp.com-20130102161458-4pvpvfb1shmt0sjy
2013-01-02 17:14:58 +01:00
Christophe Matthieu a4e7fa97f4 [IMP] mail sanitize: add special email address for escape in the sanitizer
bzr revid: chm@openerp.com-20130102090040-yh0vdv8b3mtwoebh
2013-01-02 10:00:40 +01:00
Christophe Matthieu 71a92f46e4 [FIX] tools: html_sanitize
bzr revid: chm@openerp.com-20121231154451-0guqjid92rfndghp
2012-12-31 16:44:51 +01:00
Thibault Delavallée be5118c704 [DOC] Added some comments. Updated failure message. Added a logging message when not capable of parsing.
bzr revid: tde@openerp.com-20121226164354-tjquf1zdyr90tl5e
2012-12-26 17:43:54 +01:00
Thibault Delavallée d7185be38c [IMP] html_sanitize: now uses the builtin cleaner of lxml.html. We also allows style attribute; the cleaner ensures no javascript or malicious code goes through those attributes. Updated and added tests for the sanitizer, especially about malicious code, and EDI-like html code.
bzr revid: tde@openerp.com-20121226162505-8rq060p375z1k9il
2012-12-26 17:25:05 +01:00
Christophe Matthieu bf11573436 [IMP] tools mail: encoding : add test for removing encoding attribute
bzr revid: chm@openerp.com-20121219143912-os160iv0q0jeyhld
2012-12-19 15:39:12 +01:00
Christophe Matthieu a31af13a3e [IMP] tools mail: add test message with xml and doctype tags don't crash
bzr revid: chm@openerp.com-20121219111853-zj16hdg7ujakksqt
2012-12-19 12:18:53 +01:00
Christophe Matthieu 50f09660fb [FIX] tools mail: html_email_clean return False (standard OpenERP) if the param is False
bzr revid: chm@openerp.com-20121120134001-ivw9dqxha2du70o6
2012-11-20 14:40:01 +01:00
Christophe Matthieu ceefb58670 [IMP] tools mail: remove one line test (double)
bzr revid: chm@openerp.com-20121120100225-it12j6qgxjn3ilbg
2012-11-20 11:02:25 +01:00
Christophe Matthieu f8a44b2bac [FIX] tools.mail: html_email_clean test type and value of empty value
bzr revid: chm@openerp.com-20121119152615-sazfnlc5uwiw0ut9
2012-11-19 16:26:15 +01:00
Christophe Matthieu a4b831e3ed [FIX] tools.mail: html_email_clean test type of empty value
bzr revid: chm@openerp.com-20121119152446-w1z1vuhfk631h0ko
2012-11-19 16:24:46 +01:00
Christophe Matthieu b4dc178588 [IMP] tools.mail: add a test for html_email_clean function, if empty string
bzr revid: chm@openerp.com-20121119151739-vcofz0abk7i71b3l
2012-11-19 16:17:39 +01:00
Thibault Delavallée f0569f7133 [MERGE] Tools: mail.py: (E)Mail management
Refactored a bit openerp/tools about (e)mails and html.
- moved some (e)mail related functions from misc to mail
- moved html_sanitizer into mail
- added html_email_clean, to clean incoming emails (remove quotes, signature)
- added a plaintext2html function, to convert plaintext into html (\n and \r are replaced by <br/>, more than two <br/> are replaced by end and beginning of paragraphs)
- append_content_to_html now uses plaintext2html, according to some new flags
- added tests for html_email_clean, plaintext2html, updated test for append_content_to_html, html_sanitize

bzr revid: tde@openerp.com-20121114150442-4rpfdy9spm1ig0qw
2012-11-14 16:04:42 +01:00
Thibault Delavallée 8e15ab0dff [FIX] Typo in tests.
bzr revid: tde@openerp.com-20121114135159-nouaj72drtot5hiv
2012-11-14 14:51:59 +01:00
Thibault Delavallée cbf3c82e88 [IMP] tools: added a true test for html_sanitize, some function renaming.
bzr revid: tde@openerp.com-20121114103849-hbxni04dpog1fxju
2012-11-14 11:38:49 +01:00
Thibault Delavallée 62c419e66f [IMP] tools: mail: improved append_content_to_html, including plaintext2html. Updated tests.
bzr revid: tde@openerp.com-20121109123521-e04g4zrhtv947l1r
2012-11-09 13:35:21 +01:00
Thibault Delavallée e6a9084677 [IMP] tools: added text2html function, basically turning plaintext into html. Added a test for this function. Updated signature for demo data.
bzr revid: tde@openerp.com-20121107164117-2caoqna2aclzowpk
2012-11-07 17:41:17 +01:00
Thibault Delavallée 4d89845de6 [IMP] tools: tests: cleaner: cleaned a bit test data. Will have to be improved.
bzr revid: tde@openerp.com-20121107093201-s0pco15msilt4erz
2012-11-07 10:32:01 +01:00
Thibault Delavallée 56b0b518a2 [IMP] tests: moved append_to_html into right test file. Added basic struct and templates for testing html_email_clean.
bzr revid: tde@openerp.com-20121106121824-wb8qf9snma7qffqe
2012-11-06 13:18:24 +01:00
Thibault Delavallée 207675a174 [REN] html_sanitize -> mail, to have a central file for methods about mail (html sanitizing, html management, emails related functions, ...).
bzr revid: tde@openerp.com-20121106115420-1h8mvzohol9zjysa
2012-11-06 12:54:20 +01:00