You are here

function _webform_strip_utf8mb4_for in Strip 4-byte UTF8 7

Return TRUE if the component type is enabled from the configurations.

Parameters

string $component_type:

Return value

bool

1 call to _webform_strip_utf8mb4_for()
strip_utf8mb4_webform_submission_presave in ./strip_utf8mb4.module
Implement hook_webform_submission_presave().

File

./strip_utf8mb4.module, line 134
Allow users to Strip 4-byte UTF8 characters. overly long 2 byte sequences, as well as characters above U+10000, and reject overly long 3 byte sequences and UTF-16

Code

function _webform_strip_utf8mb4_for($component_type) {

  // Get list of text filed widget types to be filterd or replaced.
  $strip_utf8mb4_for = variable_get('webform_strip_utf8mb4_for_component_types', array(
    'textfield',
    'textarea',
  ));
  return in_array($component_type, $strip_utf8mb4_for, TRUE);
}