Project

General

Profile

Bug #16795 » 0004670_htmlarea-1.8.3_TYPO3-4.3-beta2_svn-6273.patch

Administrator Admin, 2009-10-24 12:22

View differences:

t3lib/class.t3lib_parsehtml_proc.php (working copy)
unset($attribArray_copy['style']);
unset($attribArray_copy['rteerror']);
}
if (!count($attribArray_copy)) { // Only if href, target and class are the only attributes, we can alter the link!
// Creating the TYPO3 pseudo-tag "<LINK>" for the link (includes href/url, target and class attributes):
$bTag='<link '.$info['url'].($info['query']?',0,'.$info['query']:'').($attribArray['target']?' '.$attribArray['target']:(($attribArray['class'] || $attribArray['title'])?' -':'')).($attribArray['class']?' '.$attribArray['class']:($attribArray['title']?' -':'')).($attribArray['title']?' "'.$attribArray['title'].'"':'').'>';
$eTag='</link>';
$blockSplit[$k] = $bTag.$this->TS_links_db($this->removeFirstAndLastTag($blockSplit[$k])).$eTag;
} else { // ... otherwise store the link as a-tag.
// Unsetting 'rtekeep' attribute if that had been set.
unset($attribArray['rtekeep']);
// If the url is local, remove url-prefix
$siteURL = $this->siteUrl();
if ($siteURL && substr($attribArray['href'],0,strlen($siteURL))==$siteURL) {
$attribArray['href']=$this->relBackPath.substr($attribArray['href'],strlen($siteURL));
$linkedText = $this->removeFirstAndLastTag($blockSplit[$k]);
$linkedTextRecursive = $this->TS_links_db($linkedText);
if (trim(strip_tags($linkedTextRecursive))) {
if (!count($attribArray_copy)) {
// Only if href, target and class are the only attributes, we can alter the link!
// Creating the TYPO3 pseudo-tag "<LINK>" for the link (includes href/url, target and class attributes):
$bTagQuery = ($info['query']) ? ',0,' . $info['query'] : '';
$bTagTarget = ($attribArray['target']) ? ' ' . $attribArray['target'] :
(($attribArray['class'] || $attribArray['title']) ? ' -' : '');
$bTagClass = ($attribArray['class']) ? ' ' . $attribArray['class'] :
(($attribArray['title']) ? ' -' : '');
$bTagTitle = ($attribArray['title']) ? ' "' . $attribArray['title'] . '"' : '';
$bTag = '<link ' . $info['url'] . $bTagQuery . $bTagTarget .$bTagClass . $bTagTitle . '>';
$eTag = '</link>';
} else {
// ... otherwise store the link as a-tag.
// Unsetting 'rtekeep' attribute if that had been set.
unset($attribArray['rtekeep']);
// If the url is local, remove url-prefix
$siteURL = $this->siteUrl();
if ($siteURL && substr($attribArray['href'], 0, strlen($siteURL)) == $siteURL) {
$attribArray['href'] = $this->relBackPath . substr($attribArray['href'], strlen($siteURL));
}
$bTag = '<a ' . t3lib_div::implodeAttributes($attribArray, 1) . '>';
$eTag = '</a>';
}
$bTag='<a '.t3lib_div::implodeAttributes($attribArray,1).'>';
$eTag='</a>';
$blockSplit[$k] = $bTag.$this->TS_links_db($this->removeFirstAndLastTag($blockSplit[$k])).$eTag;
$blockSplit[$k] = $bTag . $linkedTextRecursive . $eTag;
} else {
// there is a link without linktext - which will not be visible at all in RTE. So filter it out here.
$blockSplit[$k] = '';
}
}
}
(2-2/4)