id summary reporter owner description type status priority milestone component version severity resolution keywords cc branch changelog apichanges internalchanges 11277 Unexpected results using add_script with network-path references Olemis Lang Olemis Lang " During the last years [http://tools.ietf.org/html/rfc3986#section-4.2 network-path references] are used more often due to the popularity of ''CDN'' solutions, the deployment of http/https/spdy/... and some issues in browsers (particularly MSIE) when switching to a different scheme to retrieve linked resources. When trying to use `add_script` (or similar) function with network-path references this is what I get {{{#!py >>> from wsgiref.util import setup_testing_defaults >>> environ = {} >>> setup_testing_defaults(environ) >>> from trac.web.api import Request >>> req = Request(environ, lambda *args, **kwargs: None) >>> req.locale = None >>> from trac.env import open_environment as oe >>> env = oe('/srv/trac/cleanmp') >>> from trac.web.chrome import Chrome >>> from trac.web import chrome >>> req.callbacks['chrome'] = chrome.Chrome(env).prepare_request >>> chrome.add_script(req, '//ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js') >>> from pprint import pprint >>> pprint(req.chrome['scripts']) [{'charset': 'utf-8', 'href': '/chrome/common/js/jquery.js', 'prefix': None, 'suffix': None, 'type': 'text/javascript'}, {'charset': 'utf-8', 'href': '/chrome/common/js/babel.js', 'prefix': None, 'suffix': None, 'type': 'text/javascript'}, {'charset': 'utf-8', 'href': '/chrome/common/js/trac.js', 'prefix': None, 'suffix': None, 'type': 'text/javascript'}, {'charset': 'utf-8', 'href': '/chrome/common/js/search.js', 'prefix': None, 'suffix': None, 'type': 'text/javascript'}, {'charset': 'utf-8', 'href': '/ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js', 'prefix': None, 'suffix': None, 'type': 'text/javascript'}] }}} As can be seen it will not be expanded correctly. N.B. Version in /trunk is 1.1.2 but I did not see such option in versions selector . " defect closed normal 1.0.2 general 1.1.1dev minor fixed patch, http link uri url Network-path references (URLs starting with `//`) are supported for the `[trac]` options `jquery_location`, `jquery_ui_location` and `jquery_ui_theme_location`. Network-path references (URLs starting with `//`) are supported for scripts and stylesheets added using `add_script` and `add_stylesheet`.