Skip to content Skip to sidebar Skip to footer

Referencing Javascript From Trac Wiki

I have a problem running javascripts from trac. I know there are security issues around this, but my trac installation is only used as an intranet. I have got the following code

Solution 1:

Have you tried the 'Add Headers Plugin' (http://trac-hacks.org/wiki/AddHeadersPlugin) ? It looks like it allows you to do include custom javascript like you want but in a more straightforward way than having to modify templates directly.

Solution 2:

The option is [wiki] render_unsafe_content (see documentation). You can reference the file in your site htdocs directory on the path /tracproject/chrome/site/test.js. I tried your example just now and it work correctly once the src path is changed.

See the TracInterfaceCustomization page for more details.

Post a Comment for "Referencing Javascript From Trac Wiki"