Stripes

LinkTagSupport prepends the context name to the href even if the href is a relative URL

Details

Description


The documentation for the LinkTag states that the context should only be prepended if the URL starts with "/" and doesn't start with the context. (Same as Action for FormTag). However, it will prepend the context even if the href is a relative URL.

Activity

Hide
Jon Anderson added a comment - 20/Aug/10 9:02 AM

Patch to check if URL starts with "/" before prepending the context name.

Show
Jon Anderson added a comment - 20/Aug/10 9:02 AM Patch to check if URL starts with "/" before prepending the context name.
Hide
Scott Archer added a comment - 23/Sep/10 1:19 PM

I'm having trouble reproducing this problem. Can you post some sample code that exhibits this behavior? Also what version of Stripes are you using?

Show
Scott Archer added a comment - 23/Sep/10 1:19 PM I'm having trouble reproducing this problem. Can you post some sample code that exhibits this behavior? Also what version of Stripes are you using?
Hide
Scott Archer added a comment - 23/Sep/10 1:32 PM

I was able to reproduce the problem.

Show
Scott Archer added a comment - 23/Sep/10 1:32 PM I was able to reproduce the problem.
Hide
Scott Archer added a comment - 23/Sep/10 1:33 PM

Can you commit patch provided by Jon when reporting the issue?

Show
Scott Archer added a comment - 23/Sep/10 1:33 PM Can you commit patch provided by Jon when reporting the issue?
Hide
Ben Gunter added a comment - 23/Sep/10 2:45 PM

Fixed for 1.5.4 and 1.6

Show
Ben Gunter added a comment - 23/Sep/10 2:45 PM Fixed for 1.5.4 and 1.6

People

Vote (0)
Watch (1)

Dates

  • Created:
    20/Aug/10 9:01 AM
    Updated:
    04/Jan/11 3:16 PM
    Resolved:
    23/Sep/10 2:45 PM