Convert all relative src attributes, not just images

This commit is contained in:
Kijin Sung 2017-07-05 17:32:11 +09:00
parent 9e78e9057f
commit e51836c0d9
2 changed files with 7 additions and 14 deletions

View file

@ -63,17 +63,13 @@ class image_link extends EditorHandler
// Image containing the address to the address conversion request uri (rss output, etc. purposes)
$temp_src = explode('/', $src);
if(substr($src, 0,2)=='./')
if(substr($src, 0, 2) === './')
{
$src = Context::getRequestUri().substr($src, 2);
$src = \RX_BASEURL . substr($src, 2);
}
else if(substr($src , 0, 1)=='/')
elseif(substr($src, 0, 1) !== '/' && strpos($temp_src[0], ':') !== false)
{
$src = Rhymix\Framework\URL::getCurrentDomainURL($src);
}
else if(!strpos($temp_src[0],':') && $src)
{
$src = Context::getRequestUri().$src;
$src = \RX_BASEURL . $src;
}
$attr_output = array();