Modify

Opened 5 years ago

Closed 4 years ago

#6468 closed defect (fixed)

0.7r7282 discussion_macros.html should call suppress links in author

Reported by: Michel Jouvin <jouvin@…> Owned by: Blackhex
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 4 years ago by Blackhex

  • Resolution set to fixed
  • Status changed from new to closed

Added to changeset r7899.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.