protected function applyHtmlSpecialCharsOnSingleFieldValue($fieldValue)
    {
        if (is_array($fieldValue)) {
            foreach ($fieldValue as $key => $fieldValueItem) {
                $fieldValue[$key] = htmlspecialchars($fieldValueItem, null, null, false);
            }
        } else {
            $fieldValue = htmlspecialchars($fieldValue, null, null, false);
        }

        return $fieldValue;
    }
protected function applyHtmlSpecialCharsOnSingleFieldValue($fieldValue)
    {
        if (is_array($fieldValue)) {
            foreach ($fieldValue as $key => $fieldValueItem) {
                $fieldValue[$key] = htmlspecialchars($fieldValueItem, null, null, false);
            }
        } else {
            $fieldValue = htmlspecialchars($fieldValue, null, null, false);
        }

        return $fieldValue;
    }
protected function applyHtmlSpecialCharsOnSingleFieldValue ( $ fieldValue ) { if ( is_array ( $ fieldValue ) ) { foreach ( $ fieldValue as $ key => $ fieldValueItem ) { $ fieldValue [ $ key ] = htmlspecialchars ( $ fieldValueItem , null , null , false ) ; } } else { $ fieldValue = htmlspecialchars ( $ fieldValue , null , null , false ) ; } return $ fieldValue ; }
Applies htmlspecialchars on all items of an array of a single value.

@param $fieldValue
@return array|string
Applies htmlspecialchars on all items of an array of a single value .