Ticket #7768 (new defect)
Opened 2 months ago
add_script & add_stylesheet don't support external scripts
| Reported by: | martin@… | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | general | Version: | |
| Severity: | normal | Keywords: | |
| Cc: |
Description
Not sure if this was indented as a security feature, but:
The add_script from trac.web.chrome doesn't support external script URLs, i.e. one which start with 'http://'. At the moment the full URL is appended to the chrome path resulting in a dysfunctional script tag.
The same should be true for add_stylesheet.
If this is indented as a security feature, then be warned that it is easily overcome by just coping and changing the add_script source code, like I did in my GoogleMapMacro, where I have to load the external Google Map API JavaScript file.


