code/libraries/joomlatools/library/view/json.php
protected function _processText($text)
    {
        $matches = array();

        preg_match_all("/(href|src)=\"(?!http|ftp|https|mailto|data)([^\"]*)\"/", $text, $matches, PREG_SET_ORDER);

        foreach ($matches as $match)
        {
            $route = $this->getObject('lib:dispatcher.router.route', array(
                'url'    => $match[2],
                'escape' => false
            ));

            //Add the host and the schema
            $route->scheme = $this->getUrl()->scheme;
            $route->host   = $this->getUrl()->host;

            $text = str_replace($match[0], $match[1].'="'.$route.'"', $text);
        }

        return $text;
    }
protected function _processText($text)
    {
        $matches = array();

        preg_match_all("/(href|src)=\"(?!http|ftp|https|mailto|data)([^\"]*)\"/", $text, $matches, PREG_SET_ORDER);

        foreach ($matches as $match)
        {
            $route = $this->getObject('lib:dispatcher.router.route', array(
                'url'    => $match[2],
                'escape' => false
            ));

            //Add the host and the schema
            $route->scheme = $this->getUrl()->scheme;
            $route->host   = $this->getUrl()->host;

            $text = str_replace($match[0], $match[1].'="'.$route.'"', $text);
        }

        return $text;
    }
protected function _processText ( $ text ) { $ matches = array ( ) ; preg_match_all ( "/(href|src)=\"(?!http|ftp|https|mailto|data)([^\"]*)\"/" , $ text , $ matches , PREG_SET_ORDER ) ; foreach ( $ matches as $ match ) { $ route = $ this -> getObject ( 'lib:dispatcher.router.route' , array ( 'url' => $ match [ 2 ] , 'escape' => false ) ) ; //Add the host and the schema $ route -> scheme = $ this -> getUrl ( ) -> scheme ; $ route -> host = $ this -> getUrl ( ) -> host ; $ text = str_replace ( $ match [ 0 ] , $ match [ 1 ] . '="' . $ route . '"' , $ text ) ; } return $ text ; }
Convert links in a text from relative to absolute and runs them through JRoute

@param string $text The text processed
@return string Text with converted links
Convert links in a text from relative to absolute and runs them through JRoute