Commit 5fdad5c8 authored by Michael Stucki's avatar Michael Stucki
Browse files

* Fixed a stupid error in the display-empty-tags function


git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@595 709f56b5-9817-0410-a4d7-c38de5d9e867
parent 043b2162
2005-04-03 Michael Stucki <michael@typo3.org>
* Fixed a stupid error in the display-empty-tags function
2005-04-01 Kasper Skårhøj,,, <kasper@typo3.com>
* Updated all years from 2004 to 2005
......
......@@ -2544,9 +2544,9 @@ class tx_cms_layout extends recordList {
* @param boolean If true, empty tags will be filled with the first attribute of the tag before.
* @return string Input string with all HTML and PHP tags stripped
*/
function strip_tags($input, $fillEmptyContent=false) {
if($fillEmptyContent && ereg('><', $input)) {
$matches = explode('</', $input);
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
......@@ -2555,9 +2555,9 @@ class tx_cms_layout extends recordList {
$matches[$key] .= $tagContent;
}
}
$output = implode('</', $matches);
$content = implode('</', $matches);
}
return strip_tags($output);
return strip_tags($content);
}
}
......
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