Feature #23633 ยป eval_regex.diff
typo3_src-4.4.2/t3lib/class.t3lib_tcemain.php 2010-09-28 18:49:28.000000000 +0200 | ||
---|---|---|
$value = preg_replace('/[^a-zA-Z0-9_-]/','',$value);
|
||
break;
|
||
default:
|
||
// Extension 'tx_...'
|
||
if (substr($func, 0, 3) == 'tx_') {
|
||
$evalObj = t3lib_div::getUserObj($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals'][$func].':&'.$func);
|
||
if (is_object($evalObj) && method_exists($evalObj, 'evaluateFieldValue')) {
|
||
$value = $evalObj->evaluateFieldValue($value, $is_in, $set);
|
||
}
|
||
}
|
||
// Regex '/.../x'
|
||
if(substr($func,0,1)=='/' && (substr($func,-1)=='/' || substr($func,-2,1)=='/')) {
|
||
preg_match($func,$value,$matches);
|
||
$value = $matches[0];
|
||
}
|
||
break;
|
||
}
|
||
}
|