Modify

Opened 14 years ago

Closed 8 years ago

#6850 closed defect (worksforme)

[PATCH] add relative url support

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

Description (last modified by Ryan J Ollos)

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 12 years ago by Ryan J Ollos

Component: BackLinksMenuMacroBackLinksMacro

The functionality of BackLinksMenuMacro is being integrated into the BackLinksMacro.

comment:2 Changed 8 years ago by Ryan J Ollos

Description: modified (diff)
Owner: changed from Trap to Ryan J Ollos
Status: newaccepted

comment:3 Changed 8 years ago by Ryan J Ollos

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 8 years ago by Ryan J Ollos

Resolution: worksforme
Status: acceptedclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
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.