--- class.t3lib_tceforms.php,org 2012-10-01 15:13:07.000000000 +0200 +++ class.t3lib_tceforms.php 2012-10-01 15:19:56.000000000 +0200 @@ -2800,7 +2800,12 @@ $replace .= '.replace(/(tceforms-(datetime|date)field-)/g,"$1" + (new Date()).getTime())'; $onClickInsert = 'var ' . $var . ' = "' . 'idx"+(new Date()).getTime();'; // Do not replace $isTagPrefix in setActionStatus() because it needs section id! - $onClickInsert .= 'new Insertion.Bottom($("' . $idTagPrefix . '"), ' . json_encode($newElementTemplate) . '.' . $replace . '); setActionStatus("' . $idTagPrefix . '");'; + if ( (strtolower($GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset']) === +'utf-8') ) + $newElementTemplatePatched = $newElementTemplate; + else + $newElementTemplatePatched = utf8_encode( $newElementTemplate ); + $onClickInsert .= 'new Insertion.Bottom($("' . $idTagPrefix . '"), ' . json_encode( $newElementTemplatePatched ) . '.' . $replace . '); setActionStatus("' . $idTagPrefix . '");'; $onClickInsert .= 'eval(unescape("' . rawurlencode(implode(';', $this->additionalJS_post)) . '").' . $replace . ');'; $onClickInsert .= 'TBE_EDITOR.addActionChecks("submit", unescape("' . rawurlencode(implode(';', $this->additionalJS_submit)) . '").' . $replace . ');'; $onClickInsert .= 'TYPO3.TCEFORMS.update();';