[PATCH] Allow "live browsing" of repository contents
|Reported by:||Owned by:||Christian Boos|
Trac provides a way to view the original format of a file (if render_unsafe_content is set to true). The problem is that this simply adds the ?format=raw parameter to the URL. If I view a HTML file with relative links, images, stylesheet, scripts etc. the links will remain the same and an <img src="foo.png" alt=""> will simply cause the browser to not display the image because Trac will only return the original image if <img src="foo.png?format=raw" alt=""> would be specified.
Of course, modifying all links inside HTML files when displaying them as original format is error-prone, inelegant, time-consuming and would pervert the meaning of original format.
ViewVC comes with a clever idea of how to solve this - if a the revision log of a file is accessible through viewvc/path/to/file.html - then viewvc/*checkout*/path/to/file.html will send the contents of that file to the browser - and relative links will work.
I've writen a small patch that makes Trac use /browser/!raw/* instead of /browser/*?format=raw.
Change History (9)
comment:6 Changed 10 years ago by
|Status:||closed → reopened|