Project

General

Profile

« Previous | Next » 

Revision 2009

Added by darkviper almost 11 years ago

! framework/functions-utf8::entities_to_7bit() deprecated warning for modifier /e in preg_replace() corrected

View differences:

functions-utf8.php
406 406
	// convert to HTML-entities, and replace entites by hex-numbers
407 407
	$str = utf8_fast_umlauts_to_entities($str, false);
408 408
	$str = str_replace(''', ''', $str);
409
	$str = preg_replace('/&#([0-9]+);/e', "dechex('$1')",  $str);
409
	if (version_compare(PHP_VERSION, '5.3', '<')) {
410
		$str = preg_replace('/&#([0-9]+);/e', "dechex('$1')",  $str);
411
	} else {
412
		$str = preg_replace_callback('/&#([0-9]+);/', create_function('$aMatches', 'return dechex($aMatches[1]);'),  $str);
413
	}
410 414
	// maybe there are some &gt; &lt; &apos; &quot; &amp; &nbsp; left, replace them too
411 415
	$str = str_replace(array('&gt;', '&lt;', '&apos;', '\'', '&quot;', '&amp;'), '', $str);
412 416
	$str = str_replace('&amp;', '', $str);

Also available in: Unified diff