Commit ef7078df authored by jcnventura's avatar jcnventura

Issue #1542056 by lklimek: handle rewrite of urls starting with //host, prepending the protocol.

parent 2c2f861e
......@@ -431,6 +431,11 @@ function _print_rewrite_urls($matches) {
// URL is absolute, do nothing
$newurl = $url;
}
elseif (strpos(html_entity_decode($url), '//') === 0) {
// URL is 'almost absolute', but it does not contain protocol; replace with base_path protocol
$newurl = (empty($_SERVER['HTTPS']) ? 'http' : 'https') . ":" . $url;
$matches[1] = str_replace($url, $newurl, $matches[1]);
}
else {
if ($url[0] == '#') {
// URL is an anchor tag
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment