Modify

Opened 7 years ago

Closed 9 months ago

#6850 closed defect (worksforme)

[PATCH] add relative url support

Reported by: Rémi Demarthe Owned by: rjollos
Priority: normal Component: BackLinksMacro
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description (last modified by rjollos)

Hello,

This snippet permit to have the right URL link.

16a17
> from trac.resource import get_relative_url
73c74,79
<                 buf.write('<li><a href="%s">' % self.env.href.wiki(row[0]))
---
>                 if row[0].find(":") >= 0 or row[0].startswith("/"):
>                     link = self.env.href.wiki(row[0])
>                 else:
>                     # Support relative paths; based on trac/wiki/formatter.py
>                     link = get_relative_url(self.env, formatter.resource(id=row[0]), formatter.href)
>                 buf.write('<li><a href="%s">' % link )

Attachments (0)

Change History (4)

comment:1 Changed 4 years ago by rjollos

  • Component changed from BackLinksMenuMacro to BackLinksMacro

The functionality of BackLinksMenuMacro is being integrated into the BackLinksMacro.

comment:2 Changed 9 months ago by rjollos

  • Description modified (diff)
  • Owner changed from trapanator to rjollos
  • Status changed from new to accepted

comment:3 Changed 9 months ago by rjollos

I'm unsure of what this change is trying to accomplish, so I'll assume it's not relevant to the current codebase.

comment:4 Changed 9 months ago by rjollos

  • Resolution set to worksforme
  • Status changed from accepted to closed

Add Comment

Modify Ticket

Action
as closed The owner will remain rjollos.
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.