Issue Bug Closed

#19533Indexing fails with PHP 5.2.5 at call to strip_tags()

Ralf Merz 10/30/08, 15:41 updated 07/13/10, 22:38

Description

TYPO3 v4.1.6
indexed_search v2.10.0
PHP v5.2.5

In the HTML Templates the begin and end markers are set only around the content. But only the title has been indexed, no content.

I´ve found out, that in class.indexer.php in function splitHTMLContent($content) on line 627 ± the line
$contentArr[‘body’] = trim(strip_tags($contentArr[‘body’]));
ended up in an empty string.

Switching back to PHP 4.4.8, the call to strip_tags() worked. For several reasons I have to use PHP 5.2.5, e.g. other TYPO3 v4.2 instances.

So I´ve changed this line to:
$contentArr[‘body’] = trim(preg_replace(“’<[\/\!]*?[^<>]*?>‘si”,”“,$contentArr[‘body’]));

Maybe this helps others. For me it works. Maybe someone can confirm this.

Other Special content I have on that page is a generated tipAFriend-link, a print-link an the tt_news latest_view. But I think that was not the problem.

Regards
Ralf

(issue imported from #M9690)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.