--- class.t3lib_tceforms.php 2012-01-31 14:17:52.000000000 +0100 +++ class.t3lib_tceforms.php 2012-01-31 17:29:36.000000000 +0100 @@ -2796,7 +2796,7 @@ $replace = 'replace(/' . $idTagPrefix . '-/g,"' . $idTagPrefix . '-"+' . $var . '+"-")'; $onClickInsert = 'var ' . $var . ' = "' . 'idx"+(new Date()).getTime();'; // Do not replace $isTagPrefix in setActionStatus() because it needs section id! - $onClickInsert .= 'new Insertion.Bottom($("' . $idTagPrefix . '"), unescape(decodeURIComponent("' . rawurlencode($newElementTemplate) . '")).' . $replace . '); setActionStatus("' . $idTagPrefix . '");'; + $onClickInsert .= 'new Insertion.Bottom($("' . $idTagPrefix . '"), ' . json_encode($newElementTemplate) . '.' . $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 .= 'return false;';