BUG 12118 Fatal error en un dynaform cuando se habilita el html SOLVED
- Cuando se da click en enable html para habilitar la edición de un dynaform, luego de guardar y volver a preview se da un fatal error. - Change how smarty tags filtering, undoing the change if incorrect on a smarty.
This commit is contained in:
@@ -543,15 +543,15 @@ class dynaformEditorAjax extends dynaformEditor implements iDynaformEditorAjax
|
||||
public function set_htmlcode($A, $htmlcode)
|
||||
{
|
||||
try {
|
||||
$iOcurrences = preg_match_all('/\{[\S*\<[^\>]*\S*\s*\>*\S*]*\$\S*\<[^\>]*\S*\s*\>*\S*\}/im', $htmlcode, $matches);
|
||||
$iOcurrences = preg_match_all('/\{\$\S*\s*\}/im', $htmlcode, $matches);
|
||||
if ($iOcurrences) {
|
||||
if (isset($matches[0])) {
|
||||
$tagsHtml = $matches[0];
|
||||
foreach ($tagsHtml as $value) {
|
||||
$aTagVar = str_replace("{", "{", $value);
|
||||
$aTagVar = str_replace("}", "}", $aTagVar);
|
||||
$aTagVar = str_replace("$", "$", $aTagVar);
|
||||
$htmlcode = str_replace($value, $aTagVar, $htmlcode);
|
||||
$aTagVar = strip_tags($value);
|
||||
if ($value != $aTagVar) {
|
||||
$htmlcode = str_replace($value, $aTagVar, $htmlcode);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user