[MERGE] tools: regex to find the good partner name
bzr revid: qdp-launchpad@openerp.com-20130314170010-ggybuy16m96kulem
This commit is contained in:
commit
43afe718fd
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue