Edgewall Software
Modify

Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#10865 closed defect (fixed)

Cut and paste of attachment name leads to zero-width character in string, preventing attachment TracLink from linking to attachment

Reported by: Ryan J Ollos <ryan.j.ollos@…> Owned by: Christian Boos
Priority: normal Milestone: 1.0.1
Component: wiki system Version:
Severity: normal Keywords: needfixup
Cc: Branch:
Release Notes:

Strip ZWSP characters from end of an attachment TracLink's target.

API Changes:
Internal Changes:

Description

The problem with ZWSP characters in cut and paste filenames, which was resolved in #10668 for the Image macro, has been observed (comment:13:ticket:10834) to occur for attachment TracLinks as well.

Attachments (1)

t10865-r11361-1.patch (2.9 KB ) - added by Ryan J Ollos <ryan.j.ollos@…> 12 years ago.
Patch against r11361 of the trunk.

Download all attachments as: .zip

Change History (7)

comment:1 by Ryan J Ollos <ryan.j.ollos@…>, 12 years ago

The attached patch allows a trailing whitespace when matching the long form of a TracLink. Therefore [attachment:somefile.txt ] will render as attachment:somefile.txt. I don't see another way to solve this issue yet, though I suppose we could do a more specific match for the ZWSP character, rather than any unicode whitespace character.

comment:2 by Ryan J Ollos <ryan.j.ollos@…>, 12 years ago

The patch also addresses some other misc issues:

  • Encoding was not specified for trac.tests.wikisyntax, which I encountered when trying to add a unit test that contained a unicode character (the unit test was removed before the patch was generated).
  • In trac.wiki.formatter, trac.util.unquote_label was being imported twice, with one of the imports via trac.web.api.

by Ryan J Ollos <ryan.j.ollos@…>, 12 years ago

Attachment: t10865-r11361-1.patch added

Patch against r11361 of the trunk.

comment:3 by Christian Boos, 12 years ago

Component: generalwiki system
Keywords: needfixup added
Milestone: next-stable-1.0.x
Owner: set to Christian Boos
Status: newassigned

\u200b is not covered by \s…

The changes needed to the regexps were a bit more involved and getting \u200b in the regexp was a bit tricky due to the r"..." string.

comment:4 by Christian Boos, 12 years ago

Resolution: fixed
Status: assignedclosed

Fixed in r11407.

comment:5 by Christian Boos, 12 years ago

Milestone: next-stable-1.0.x1.0.1

comment:6 by Ryan J Ollos <ryan.j.ollos@…>, 11 years ago

Release Notes: modified (diff)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos 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.