Modify ↓
Opened 7 months ago
Closed 7 months ago
#13754 closed defect (fixed)
Blame view doesn't work when the repository name has meta characters
Reported by: | Jun Omae | Owned by: | Jun Omae |
---|---|---|---|
Priority: | normal | Milestone: | 1.6.1 |
Component: | version control/browser | Version: | |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: |
Fixed blame view not working when repository name has meta characters. |
||
API Changes: | |||
Internal Changes: |
Description
The following error is logged after clicking revision number in rev column of blame view for the repository name has meta characters.
2024-05-26 10:57:06,360 Trac[main] WARNING: [127.0.0.1] HTTPInternalServerError: 500 Trac Error (Repository 'svn&amp;repos' not found), <RequestWithSession "GET '/changeset/3/svn&amp;repos?annotate=%2Fnormal.txt'">, referrer 'http://127.0.0.1:3000/tracenv/browser/svn%26amp%3Brepos/normal.txt?annotate=blame'
We should use to_json()|safe
in the <script>
tag of templates.
-
trac/versioncontrol/templates/browser.html
diff --git a/trac/versioncontrol/templates/browser.html b/trac/versioncontrol/templates/browser.html index aabdc428d..9c98c081b 100644
a b 63 63 }); 64 64 # elif file: 65 65 # if file.annotate == 'blame': 66 enableBlame( "${href.changeset()}/", "${reponame}", "${path}");66 enableBlame(${to_json(href.changeset() + '/')|safe}, ${to_json(reponame)|safe}, ${to_json(path)|safe}); 67 67 # endif 68 68 $('#preview table.code').enableCollapsibleColumns( 69 69 $('#preview table.code thead th.content'));
Attachments (0)
Change History (1)
comment:1 by , 7 months ago
Release Notes: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
Fixed in [17806] and merged in [17807].