Project

General

Profile

Bug #16799 » T3_strcspn_bug.diff

Administrator Admin, 2006-12-20 14:26

View differences:

typo3_src-4.0.2/t3lib/class.t3lib_div.php 2006-11-09 16:31:14.307695000 +0100
} else { // Just a value:
// Look for binary chars:
if (strcspn($v,$binaryChars) != strlen($v)) { // Go for base64 encoding if the initial segment NOT matching any binary char has the same length as the whole string!
if (strlen($v) > 0 && strcspn($v,$binaryChars) != strlen($v)) { // Go for base64 encoding if the initial segment NOT matching any binary char has the same length as the whole string!
// If the value contained binary chars then we base64-encode it an set an attribute to notify this situation:
$content = chr(10).chunk_split(base64_encode($v));
$attr.=' base64="1"';
(1-1/2)