Opened 18 years ago
Closed 18 years ago
#3842 closed defect (fixed)
attachment: links embedded in headings don't work
Reported by: | Owned by: | Christian Boos | |
---|---|---|---|
Priority: | normal | Milestone: | 0.11 |
Component: | wiki system | Version: | 0.10 |
Severity: | minor | Keywords: | context |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Embedding an attachment: link in a heading, such as:
= attachment:foo.txt = = [attachment:foo.txt foo] =
results in a link back to the root wiki page, rather than to the attachment. Also, the color of the link text is gray (perhaps reflecting that it's broken?)
Attachments (0)
Change History (3)
comment:1 by , 18 years ago
Milestone: | → 0.11 |
---|---|
Owner: | changed from | to
Severity: | normal → minor |
comment:2 by , 18 years ago
When the page has attachment and WikiInclude the page,
results in a link back to the root wiki page, rather than to the attachment.
version 0.9 branches/0.9-stable/trac/attachment.py#2724
468 attachment = Attachment(self.env, parent_type, parent_id, filename) 469 return '<a class="attachment" title="Attachment %s" href="%s">%s</a>' \ 470 % (util.escape(attachment.title), 471 util.escape(attachment.href() + params), 472 util.escape(label))
version 0.10 branches/0.10-stable/trac/attachment.py#4383
617 attachment = Attachment(self.env, parent_type, parent_id, filename) 618 if formatter.req: 619 href = attachment.href(formatter.req) + params 620 return html.A(label, class_='attachment', href=href, 621 title='Attachment %s' % attachment.title)
at line 618 if statement goes false, and it would not convert to the attachment.
comment:3 by , 18 years ago
Keywords: | context added |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Fixed in r4451.
The WikiInclude plugin for 0.11 should probably be rewritten to take advantage of WikiContexts.
This is another symptom of a known issue. The wiki formatter doesn't yet propagate the "context" to sub-formatters (in this specific example, the OutlineFormatter).
I think I'll get to fix that in the next release.