Lines 152-162
Link Here
|
152 |
throw new JspTagException( |
152 |
throw new JspTagException( |
153 |
Resources.getMessage("IMPORT_BAD_RELATIVE")); |
153 |
Resources.getMessage("IMPORT_BAD_RELATIVE")); |
154 |
} |
154 |
} |
155 |
if (context.equals("/")) { |
155 |
if (context.endsWith("/") && url.startsWith("/")) { |
156 |
// Don't produce string starting with '//', many |
156 |
// Don't produce string starting with '//', many |
157 |
// browsers interpret this as host name, not as |
157 |
// browsers interpret this as host name, not as |
158 |
// path on same host. |
158 |
// path on same host. Bug 22860 |
159 |
return url; |
159 |
// Also avoid // inside the url. Bug 34109 |
|
|
160 |
return (context.substring(0, context.length() - 1) + url); |
160 |
} else { |
161 |
} else { |
161 |
return (context + url); |
162 |
return (context + url); |
162 |
} |
163 |
} |