Modify ↓
#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: | 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)
Change History (7)
comment:1 by , 12 years ago
comment:2 by , 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 viatrac.web.api
.
comment:3 by , 12 years ago
Component: | general → wiki system |
---|---|
Keywords: | needfixup added |
Milestone: | → next-stable-1.0.x |
Owner: | set to |
Status: | new → assigned |
\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:5 by , 12 years ago
Milestone: | next-stable-1.0.x → 1.0.1 |
---|
comment:6 by , 12 years ago
Release Notes: | modified (diff) |
---|
Note:
See TracTickets
for help on using tickets.
The attached patch allows a trailing whitespace when matching the long form of a TracLink. Therefore
[attachment:somefile.txt ]
will render asattachment: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.