##// END OF EJS Templates
templates/filters: strip quotes from {author|person}...
"Yann E. MORIN" -
r16235:eb39bbda default
parent child Browse files
Show More
@@ -242,12 +242,14 b' def permissions(flags):'
242 242 return "-rw-r--r--"
243 243
244 244 def person(author):
245 """:person: Any text. Returns the text before an email address."""
245 """:person: Any text. Returns the name before an email address,
246 interpreting it as per RFC 5322.
247 """
246 248 if not '@' in author:
247 249 return author
248 250 f = author.find('<')
249 251 if f != -1:
250 return author[:f].rstrip()
252 return author[:f].strip(' "').replace('\\"', '"')
251 253 f = author.find('@')
252 254 return author[:f].replace('.', ' ')
253 255
General Comments 0
You need to be logged in to leave comments. Login now