Changeset 1117 in main for branches


Ignore:
Timestamp:
05/23/12 13:10:06 (8 years ago)
Author:
pcosquer
Message:

fixes regex to hide emails

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.0/openPLM/plmapp/templatetags/plmapp_tags.py

    r1108 r1117  
    128128# but we may have to hide something like user@<em>domain</em> 
    129129# it is only use to hide an email 
    130 _email_rx = re.compile(r"\b[\w.>_<%+-]+@[\w_<>]+\.[\w_><]+\b") 
     130_email_rx = re.compile(r"\b[\w.>_<%+-]+@[\w_<>-]+(\.[\w_><-]+)+\b") 
    131131@register.filter 
    132132def hide_emails(text): 
Note: See TracChangeset for help on using the changeset viewer.