Project

General

Profile

Bug #19396 » typo3core_bugfix_9455_4-2-8_v2.patch

Administrator Admin, 2009-09-21 14:57

View differences:

t3lib/class.t3lib_parsehtml_proc.php
} 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));
if (!$attribArray['external']) {
// 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));
}
}
unset($attribArray['external']);
$bTag='<a '.t3lib_div::implodeAttributes($attribArray,1).'>';
$eTag='</a>';
$blockSplit[$k] = $bTag.$this->TS_links_db($this->removeFirstAndLastTag($blockSplit[$k])).$eTag;
......
$uP = parse_url(strtolower($attribArray['href']));
if (!$uP['scheme']) {
$attribArray['href'] = $this->siteUrl().substr($attribArray['href'],strlen($this->relBackPath));
} elseif ($uP['scheme'] != 'mailto') {
$attribArray['external'] = 1;
}
} else {
$attribArray['rtekeep'] = 1;
typo3/sysext/rtehtmlarea/extensions/TYPO3Link/class.tx_rtehtmlarea_typo3link.php
$registerRTEinJavascriptString .= '
RTEarea['.$RTEcounter.'].buttons.'. $button .'.classesAnchorUrl = "' . $this->htmlAreaRTE->writeTemporaryFile('', 'classesAnchor_'.$this->htmlAreaRTE->contentLanguageUid, 'js', $this->buildJSClassesAnchorArray()) . '";';
}
$registerRTEinJavascriptString .= '
RTEarea['.$RTEcounter.'].buttons.'. $button .'.additionalAttributes = "external' . ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->extensionKey]['plugins'][$this->pluginName]['additionalAttributes'] ? (',' . $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->extensionKey]['plugins'][$this->pluginName]['additionalAttributes']) : '') . '";';
}
return $registerRTEinJavascriptString;
}
typo3/sysext/rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php
}
// Note: parseCurUrl will invoke the hooks
$this->curUrlInfo = $this->parseCurUrl($this->curUrlArray['href'],$this->siteURL);
if (isset($this->curUrlArray['external']) && $this->curUrlInfo['act'] != 'mail') {
$this->curUrlInfo['act'] = 'url';
$this->curUrlInfo['info'] = $this->curUrlArray['href'];
}
// Determine nature of current url:
$this->act = t3lib_div::_GP('act');
if (!$this->act) {
......
<tr>
<td>URL:</td>
<td><input type="text" name="lurl"'.$this->doc->formWidth(20).' value="'.htmlspecialchars($this->curUrlInfo['act']=='url'?$this->curUrlInfo['info']:'http://').'" /> '.
'<input type="submit" value="'.$LANG->getLL('setLink',1).'" onclick="if (/^[A-Za-z0-9_+]{1,8}:/.test(document.lurlform.lurl.value)) { browse_links_setHref(document.lurlform.lurl.value); } else { browse_links_setHref(\'http://\'+document.lurlform.lurl.value); }; return link_current();" /></td>
'<input type="submit" value="'.$LANG->getLL('setLink',1).'" onclick="if (/^[A-Za-z0-9_+]{1,8}:/.test(document.lurlform.lurl.value)) { browse_links_setHref(document.lurlform.lurl.value); } else { browse_links_setHref(\'http://\'+document.lurlform.lurl.value); }; browse_links_setAdditionalValue(\'external\', \'1\'); return link_current();" /></td>
</tr>
</table>
</form>';
......
<td>
</td>
<td colspan="3">
<input type="submit" value="'.$LANG->getLL('update',1).'" onclick="return link_current();" />
<input type="submit" value="'.$LANG->getLL('update',1).'" onclick="' . (($this->act == 'url') ? 'browse_links_setAdditionalValue(\'external\', \'1\'); ' : '') .'return link_current();" />
</td>
</tr>';
}
(5-5/8)