Project

General

Profile

« Previous | Next » 

Revision 3737

check for a leading "/" in the path when prepending the server context url.
we don't want to step on toes of people that are using "semi" relative paths (they leave out the server part, but provide the rest of the path)

View differences:

lib/style/common/branding.js
85 85
	var retUrl = path;
86 86
	if ( !_isBlank(path) ) {
87 87
		if ( !_isBlank(prefix) ) {
88
			//check if absolute
88 89
			if (path.indexOf("http") < 0) {
89
				retUrl = prefix + "/" + path;
90
				//check if the server has been assumed with a leading "/"
91
				if (path.indexOf("/") != 0) {
92
					retUrl = prefix + "/" + path;
93
				}
90 94
			}
91 95
		}
92 96
	}

Also available in: Unified diff