Opened 7 weeks ago
Closed 7 weeks ago
#13914 closed defect (fixed)
quick-jump search not working with diff: links
| Reported by: | David Matthews | Owned by: | Jun Omae |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.6.1 |
| Component: | search system | Version: | 1.6 |
| Severity: | normal | Keywords: | |
| Cc: | Branch: | ||
| Release Notes: |
Fixed html-escaped URL which is redirected from the quickjump. |
||
| API Changes: | |||
| Internal Changes: | |||
Description
If you enter diff:@1:3 into search, Trac displays changeset 3 rather than the expected diff (diff:@1:3).
Note: The page displays a notice saying "You arrived here through the quick-jump search feature. To instead search for the term diff:@1:3, click here." If you follow that link then that page shows a quickjump link which works correctly.
I've tested this on the 1.4 and 1.6 demo Trac's and they both have this problem. I have previously used this feature with Trac 1.0 when it worked as expected.
Attachments (0)
Change History (2)
comment:1 by , 7 weeks ago
| Milestone: | → 1.6.1 |
|---|---|
| Owner: | set to |
| Status: | new → assigned |
comment:2 by , 7 weeks ago
| Release Notes: | modified (diff) |
|---|---|
| Resolution: | → fixed |
| Status: | assigned → closed |



Good catch! This issue began occurring in Trac 1.4 which the template engine is switched from Genshi to Jinja2.
trac/search/web_ui.py
We need to investigate whether similar issues exist on the following locations:
$ git grep '\.attrib[.\[]' contrib/checkwiki.py: mark = 'missing' in rv.attrib.get('class').split() trac/mimeview/rst.py: uri = elt.attrib.get('href', '') trac/mimeview/rst.py: missing = 'missing' in elt.attrib.get('class', '').split() trac/search/web_ui.py: quickjump_href = link.attrib.get('href').unescape() trac/search/web_ui.py: description = link.attrib.get('title', '') trac/util/html.py: self.attrib.update(d) trac/util/html.py: v = self.attrib[k] trac/util/html.py: if cls is not None and cls in frag.attrib.get('class', '').split(): trac/wiki/formatter.py: class_ = text.attrib.get('class', '') trac/wiki/intertrac.py: href = elt.attrib.get('href').unescape() trac/wiki/macros.py: link = elt.attrib.get('href') tracopt/versioncontrol/svn/tests/svn_fs.py: href = a.attrib.get('href') tracopt/versioncontrol/svn/tests/svn_fs.py: title = a.attrib.get('title')