Edgewall Software
Modify

Opened 15 years ago

Closed 15 years ago

#1805 closed defect (invalid)

WikiFormatter/TracLinks escapes too much

Reported by: clh@… Owned by: Jonas Borgström
Priority: normal Milestone:
Component: wiki system Version: 0.8.4
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:

Description

The WikiFormatter is a bit too enthusiastic about escaping URLs used in TracLinks — specifically, I wanted to create a TracLink to the head revision of a file, and so wrote [source:path/to/file.java?rev=head My Link Text] in the description for the new ticket I was entering. It got escaped, so that the link was to path/to/file.java%3Frev%3Dhead instead. That URL yields a 404 error, not the head revision of path/to/file.java.

I have also noticed that it always escapes ampersands, even when they're the prefix to an HTML character entity. In other words, I should be able to write [ and get a left square bracket. But what I get instead is [.

Attachments (0)

Change History (1)

comment:1 by Christopher Lenz, 15 years ago

Resolution: invalid
Status: newclosed

About issue one: see TracLinks. You can use [source:path/to/file.java#head My Link Text] (i.e. the hash symbol) to link to a specific revision (or, as in this case, the latest revision).

About the second issue: if this is the link appearing in the markup, then that's how it's supposed to be; unescaped ampersands are not allowed in XHTML (or HTML, for that matter). The browser should translate & to a normal ampersand when resolving the link. (However, if the ampersand is being escaped twice, that's a bug… feel free to reopen this ticket if that's the case).

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to as closed The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.