Modify

Opened 3 years ago

Last modified 21 months ago

#8923 new defect

Links in ticket comments breaks html formatting

Reported by: kun.woo.lee@… Owned by: hasienda
Priority: normal Component: AnnouncerPlugin
Severity: normal Keywords: needinfo AttributeError formatter
Cc: doki_pen Trac Release: 0.11

Description

I've found a bug where html formatting fails if a comment contains an URL. Because of this the announce plugin will revert to plaintext comment and the comment becomes almost undecipherable. This looks like it might be a bug in Trac rather than AnnouncerPlugin, but I wonder if anything can be done to work around it.

Attachments (0)

Change History (9)

comment:1 Changed 3 years ago by kun.woo.lee@…

I dug a little deeper and saw this in the logs:

File "build/bdist.linux-x86_64/egg/trac/wiki/formatter.py", line 660, in _make_ext_link
    (self.req or self.env).abs_href.base
AttributeError: 'unicode' object has no attribute 'base'

So I commented out the section where it tries to use the .base attribute and it works now. Again, I don't know if this is a bug in Trac or if AnnouncerPlugin is using incorrect classes...

comment:2 follow-up: Changed 22 months ago by rjollos

#9548 closed as a duplicate.

comment:3 in reply to: ↑ 2 ; follow-up: Changed 21 months ago by hasienda

  • Cc doki_pen added
  • Keywords AttributeError formatter added
  • Owner changed from doki_pen to hasienda

Replying to rjollos:

#9548 closed as a duplicate.

Indeed, but it has a much better trace-back - good to instantly see the call origination.

comment:4 Changed 21 months ago by hasienda

Because #9548 refers to TracAnnouncer-0.11.1 I assume it for this report as well. I have no way, if the OP doesn't mention exact Trac and AnnouncerPlugin versions (revision number preferred).

Note though, that the HTML part is rendered differently in recent code, and I can't reproduce this issue anymore. I'd appreciate, if you test with latest trunk and confirm fix or give more details on problems, that persist.

Current code works on Trac-0.12 and younger, but should become compatible even with Trac-0.11 really soon.

comment:5 Changed 21 months ago by hasienda

  • Keywords needinfo added

I strictly require some feedback, or I'll assume, that the issue has been resolved meanwhile as suggested. So the ticket will be closed at the time of announcer-1.0 release, or earlier.

comment:6 Changed 21 months ago by kun.woo.lee@…

Hi, I'm the original reporter for this. We've updated to 0.12 and I don't think I've seen this issue, but I'll verify and update.

comment:7 in reply to: ↑ 3 Changed 21 months ago by rjollos

Replying to hasienda:

Indeed, but it has a much better trace-back - good to instantly see the call origination.

Good point. I had kept this one open only because of the more descriptive summary. From my experience working with the AnnouncerPlugin trunk, I would say the issue has been fixed by now.

comment:8 Changed 21 months ago by anonymous

Yea, I think you can close this. I'm unable to replicate with 0.12.

comment:9 Changed 21 months ago by kun.woo.lee@…

The previous comment was by me, the OP.

Add Comment

Modify Ticket

Action
as new .
Author


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

 
Note: See TracTickets for help on using tickets.