Modify

Opened 14 years ago

Closed 14 years ago

#6468 closed defect (fixed)

0.7r7282 discussion_macros.html should call suppress links in author

Reported by: Michel Jouvin <jouvin@…> Owned by: Radek Bartoň
Priority: normal Component: DiscussionPlugin
Severity: minor Keywords:
Cc: Trac Release: 0.11

Description

Hi,

In 0.7, format_to_oneliner_no_links is called to display author by most templates except display_discussion in discussion_macros. This results in potential email in author name being displayed as a link. This happens in particular if you authenticate with a certificate whose DN contains emailAdress=xxx@dom.ain. This results in an inconsistency with the way it is displayed for replies.

I implemented a fix that restores consistency:

--- tracdiscussion/templates/discussion-macros.html     (revision 7421)
+++ tracdiscussion/templates/discussion-macros.html     (working copy)
@@ -2,6 +2,7 @@
   <?python
     from trac.wiki.formatter import format_to_oneliner, format_to_html
     from trac.util.datefmt import format_datetime, pretty_timedelta
+    from tracdiscussion.api import format_to_oneliner_no_links
   ?>
 
   <py:def function="sortable_th(order, desc, Class, title, href)">
@@ -47,7 +48,7 @@
 
         <div class="footer">
           <div class="author">
-            ${format_to_oneliner(discussion.env, context, discussion.topic.author)}
+            ${format_to_oneliner_no_links(discussion.env, context, discussion.topic.author)}
           </div>
           <div class="time">
             ${format_datetime(discussion.topic.time)} (${pretty_timedelta(discussion.topic.time)} ago)

Cheers,

Michel

Attachments (0)

Change History (1)

comment:1 Changed 14 years ago by Radek Bartoň

Resolution: fixed
Status: newclosed

Added to changeset r7899.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Radek Bartoň.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.