Edgewall Software
Modify

Opened 17 years ago

Closed 17 years ago

#6072 closed task (fixed)

wrap email addresses

Reported by: r.sokoll@… Owned by: Christian Boos
Priority: normal Milestone: 0.11
Component: ticket system Version: devel
Severity: trivial Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I'm on r6029

trac.ini has

[trac]
show_email_addresses = true

All addresses in CC field are in one long line. If show_email_addresses is set to false, the addresses are wrapped.

Attachments (0)

Change History (3)

comment:1 by Christian Boos, 17 years ago

Owner: changed from Jonas Borgström to Christian Boos
Status: newassigned

Can you please try the following patch?

Index: trac/ticket/web_ui.py
===================================================================
--- trac/ticket/web_ui.py	(revision 6038)
+++ trac/ticket/web_ui.py	(working copy)
@@ -942,12 +942,11 @@
                                     .render_milestone_link(href, milestone,
                                                            milestone)
             elif name == 'cc':
-                self.env.log.debug('Checking MUPPETS %s', context)
+                all_cc = cc_list(ticket[name])
                 if not (Chrome(self.env).show_email_addresses or \
                         'EMAIL_VIEW' in req.perm(context)):
-                    field['rendered'] = ', '.join(
-                        [obfuscate_email_address(cc)
-                         for cc in cc_list(ticket[name])])
+                    all_cc = [obfuscate_email_address(cc) for cc in all_cc]
+                field['rendered'] = ', '.join(all_cc)
                     
             # ensure sane defaults
             field.setdefault('optional', False)

I had some difficulties into reproducing the issue, until I realized that we now normalize the list before writing the field in the db. So this problem happens only with old existing CC lists containing no spaces and the fix is only necessary for those.

comment:2 by r.sokoll@…, 17 years ago

Perfect! Thanks a lot!

comment:3 by Christian Boos, 17 years ago

Resolution: fixed
Status: assignedclosed

Fix applied in r6073.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.