diff --git a/workflow/engine/classes/class.propelTable.php b/workflow/engine/classes/class.propelTable.php index e66ed9873..1471c2c6e 100755 --- a/workflow/engine/classes/class.propelTable.php +++ b/workflow/engine/classes/class.propelTable.php @@ -397,12 +397,22 @@ class propelTable $value = ''; } // checking if the value variable is a html field, a html tag content can't contain   as white spaces - $testValue = preg_match( "/<\/?\w+((\s+(\w|\w[\w-]*\w)(\s*=\s*(?:\".*?\"|'.*?'|[^'\">\s]+))?)+\s*|\s*)\/?>/i", $value, $matches ); - if (empty($matches)){ - $this->tpl->assign( "value" , (preg_match('^[[:space:]]^', $value) && (substr($fieldName,0,3)!="PRO"))? str_ireplace(" "," ",$htmlField):$htmlField ); + + $testValue = preg_match( "/(.*)<\/a>/i", $htmlField, $value); + $this->tpl->assign( "value" , $htmlField ); + if ($testValue>0 && (isset($value[1]) && strlen(trim($value[1])) == 0 )) { + $this->tpl->assign( "value" , " " ); + // $this->tpl->assign( "value" , (preg_match('^[[:space:]]^', $value) && (substr($fieldName,0,3)!="PRO"))? str_ireplace(" "," ",$htmlField):$htmlField ); } else { $this->tpl->assign( "value" , $htmlField ); } + + /* $testValue = preg_match( "/<\/?\w+((\s+(\w|\w[\w-]*\w)(\s*=\s*(?:\".*?\"|'.*?'|[^'\">\s]+))?)+\s*|\s*)\/?>/i", $value, $matches ); */ +// if (empty($matches)){ +// $this->tpl->assign( "value" , (preg_match('^[[:space:]]^', $value) && (substr($fieldName,0,3)!="PRO"))? str_ireplace(" "," ",$htmlField):$htmlField ); +// } else { +// $this->tpl->assign( "value" , $htmlField ); +// } } return $this->fields[$r]['Type']; }