Closed yogthos closed 12 years ago
Your example doesn't show it being treated as a relative URL (a URI can be relative or absolute). However, when used with with-base-url
, there is a problem:
user> (with-base-url "/foo" (html (include-js "//bar.com/baz")))
"<script src=\"/foo//bar.com/baz\" type=\"text/javascript\"></script>"
This is because a schemaless URL is not considered to be absolute by Java (which makes sense, now that I think about it), and Hiccup is designed to append the base URL to any relative URL that starts with a slash.
I'll fix this issue and release 1.0.1.
great thanks!
When deploying with a context root if a url does not specify a protoco then it will be treated as a relative URL: