Fix incorrect URL conversion in image_link component

This commit is contained in:
Kijin Sung 2017-08-28 19:48:47 +09:00
parent 6aebe472e2
commit cc21af669f

View file

@ -62,12 +62,11 @@ class image_link extends EditorHandler
$sslPort = $sslPort != '443' ? ':'.$sslPort : '';
// Image containing the address to the address conversion request uri (rss output, etc. purposes)
$temp_src = explode('/', $src);
if(substr($src, 0, 2) === './')
{
$src = \RX_BASEURL . substr($src, 2);
}
elseif(substr($src, 0, 1) !== '/' && strpos($temp_src[0], ':') !== false)
elseif(substr($src, 0, 1) !== '/' && !preg_match('!^https?:!i', $src))
{
$src = \RX_BASEURL . $src;
}