Project

General

Profile

Bug #16996 ยป 5003_take2.patch

Administrator Admin, 2010-05-07 03:23

View differences:

t3lib/class.t3lib_parsehtml.php (Arbeitskopie)
* @return string Output path, prefixed if no scheme in input string
* @access private
*/
function prefixRelPath($prefix,$srcVal,$suffix='') {
$pU = parse_url($srcVal);
if (!$pU['scheme'] && substr($srcVal, 0, 1)!='/') { // If not an absolute URL.
$srcVal = $prefix.$srcVal.$suffix;
function prefixRelPath($prefix, $srcVal, $suffix = '') {
// Only prefix if it's not an absolute URL or
// only a link to a section within the page.
if (substr($srcVal, 0, 1) != '/' && substr($srcVal, 0, 1) != '#') {
$urlParts = parse_url($srcVal);
// only prefix URLs without a scheme
if (!$urlParts['scheme']) {
$srcVal = $prefix . $srcVal . $suffix;
}
}
return $srcVal;
}
    (1-1/1)