Feature #16972 » patch_typolink_3.diff
class.tslib_content.php (working copy) | ||
---|---|---|
if ($forceTitle) {$title=$forceTitle;}
|
||
if ($JSwindowParams) {
|
||
$wtarget=$conf['JSWindow.']['target']?$conf['JSWindow.']['target']:'FEopenLink';
|
||
$winObj = $conf['JSWindow.']['windowVar'] ? $conf['JSWindow.']['windowVar'] : 'vHWin_'.md5(rand());
|
||
|
||
|
||
// Create TARGET-attribute only if the right doctype is used
|
||
if (!t3lib_div::inList('xhtml_strict,xhtml_11,xhtml_2', $GLOBALS['TSFE']->xhtmlDoctype)) {
|
||
$target = ' target="'.$wtarget.'"';
|
||
} else {
|
||
$target = '';
|
||
}
|
||
$onClick="vHWin=window.open('".$GLOBALS['TSFE']->baseUrlWrap($finalTagParts['url'])."','FEopenLink','".$JSwindowParams."');vHWin.focus();return false;";
|
||
$onClick=$winObj."=window.open('".$GLOBALS['TSFE']->baseUrlWrap($finalTagParts['url'])."','$wtarget','".$JSwindowParams."');".$winObj.".focus();return false;";
|
||
$res = '<a href="'.htmlspecialchars($finalTagParts['url']).'"'. $target .' onclick="'.htmlspecialchars($onClick).'"'.($title?' title="'.$title.'"':'').($linkClass?' class="'.$linkClass.'"':'').$finalTagParts['aTagParams'].'>';
|
||
} else {
|
||
if ($GLOBALS['TSFE']->spamProtectEmailAddresses === 'ascii' && $finalTagParts['TYPE'] === 'mailto') {
|
||
$res = '<a href="'.$finalTagParts['url'].'"'.($title?' title="'.$title.'"':'').$finalTagParts['targetParams'].($linkClass?' class="'.$linkClass.'"':'').$finalTagParts['aTagParams'].'>';
|
||
} else {
|
||
$res = '<a href="'.htmlspecialchars($finalTagParts['url']).'"'.($title?' title="'.$title.'"':'').$finalTagParts['targetParams'].($linkClass?' class="'.$linkClass.'"':'').$finalTagParts['aTagParams'].'>';
|
||
}
|
||
}
|
||