Added a filter for use in displaying document comments and discusses which unfortunately sometimes use html <br> markup, which should give line breaks, and sometimes contain <email@domain> which should *not* be interpreted as html, but rendered as <...
- Legacy-Id: 5075
This commit is contained in:
parent
9a302b63dc
commit
dde89d19f4
|
@ -71,6 +71,12 @@ def parse_email_list(value):
|
|||
else:
|
||||
return value
|
||||
|
||||
@register.filter(name='fix_angle_quotes')
|
||||
def fix_angle_quotes(value):
|
||||
if "<" in value:
|
||||
value = re.sub("<([\w\-\.]+@[\w\-\.]+)>", "<\1>", value)
|
||||
return value
|
||||
|
||||
# there's an "ahref -> a href" in GEN_UTIL
|
||||
# but let's wait until we understand what that's for.
|
||||
@register.filter(name='make_one_per_line')
|
||||
|
|
Loading…
Reference in a new issue