Commit e25fadf0 authored by Michael Stucki's avatar Michael Stucki
Browse files

* Fixed wrong display of empty tags in class.tx_cms_layout.php

* Fixed missing email address label if none specified in class.tslib_content.php
* Fixed missing replacement of "@" in spamProtectEmailAddresses mode in class.tslib_content.php


git-svn-id: https://svn.typo3.org/TYPO3v4/Core/branches/TYPO3_3-8@725 709f56b5-9817-0410-a4d7-c38de5d9e867
parent dcf2b353
2005-05-16 Michael Stucki <michael@typo3.org>
* Fixed wrong display of empty tags in class.tx_cms_layout.php
* Fixed missing email address label if none specified in class.tslib_content.php
* Fixed missing replacement of "@" in spamProtectEmailAddresses mode in class.tslib_content.php
2005-05-14 Michael Stucki <michael@typo3.org>
* Release of TYPO3 3.8.0rc1
......
......@@ -2545,18 +2545,11 @@ class tx_cms_layout extends recordList {
* @return string Input string with all HTML and PHP tags stripped
*/
function strip_tags($content, $fillEmptyContent=false) {
if($fillEmptyContent && ereg('><', $content)) {
$matches = explode('</', $content);
foreach($matches as $key=>$val) {
if($key==count($matches)-1) { continue; } // skip the last match
if(ereg('>$', $val)) {
$tagContent = ereg_replace('.*<[^ ]* ([^ ]*).*>', '\1', $val); // Returns the first attribut of a given tag
$matches[$key] .= $tagContent;
}
}
$content = implode('</', $matches);
if($fillEmptyContent && strstr($content, '><')) {
$content = preg_replace('/(<[^ >]* )([^ >]*)([^>]*>)(<\/[^>]*>)/', '$1$2$3$2$4', $content);
}
$content = preg_replace('/<br.?\/?>/', chr(10), $content);
return strip_tags($content);
}
}
......
......@@ -5235,6 +5235,8 @@ class tslib_cObj {
* @return string Returns a numerical array with two elements: 1) $mailToUrl, string ready to be inserted into the href attribute of the <a> tag, b) $linktxt: The string between starting and ending <a> tag.
*/
function getMailTo($mailAddress,$linktxt,$initP='?') {
if(!strcmp($linktxt,'')) { $linktxt = $mailAddress; }
$mailToUrl = 'mailto:'.$mailAddress;
if (!$GLOBALS['TSFE']->config['config']['jumpurl_enable'] || $GLOBALS['TSFE']->config['config']['jumpurl_mailto_disable']) {
......@@ -5246,8 +5248,9 @@ class tslib_cObj {
}
if ($GLOBALS['TSFE']->config['config']['spamProtectEmailAddresses_atSubst']) {
$atLabel = trim($GLOBALS['TSFE']->config['config']['spamProtectEmailAddresses_atSubst']);
$linktxt = str_replace('@',$atLabel?$atLabel:'(at)',$linktxt);
}
$linktxt = str_replace('@',$atLabel?$atLabel:'(at)',$linktxt);
if ($GLOBALS['TSFE']->config['config']['spamProtectEmailAddresses_lastDotSubst']) {
$lastDotLabel = trim($GLOBALS['TSFE']->config['config']['spamProtectEmailAddresses_lastDotSubst']);
$lastDotLabel = $lastDotLabel ? $lastDotLabel : '(dot)';
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment