[MERGE] tools: regex to find the good partner name

bzr revid: qdp-launchpad@openerp.com-20130314170010-ggybuy16m96kulem
This commit is contained in:
Quentin (OpenERP) 2013-03-14 18:00:10 +01:00
commit 43afe718fd
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ def html_sanitize(src):
src = ustr(src, errors='replace')
# html encode email tags
part = re.compile(r"(<[^<>]+@[^<>]+>)", re.IGNORECASE | re.DOTALL)
part = re.compile(r"(<(([^a<>]|a[^<>\s])[^<>]*)@[^<>]+>)", re.IGNORECASE | re.DOTALL)
src = part.sub(lambda m: cgi.escape(m.group(1)), src)
# some corner cases make the parser crash (such as <SCRIPT/XSS SRC=\"http://ha.ckers.org/xss.js\"></SCRIPT> in test_mail)