You are here

function ldap_servers_string_binary_check in Lightweight Directory Access Protocol (LDAP) 7.2

2 calls to ldap_servers_string_binary_check()
ldap_servers_test_form_submit in ldap_servers/ldap_servers.test_form.inc
Submit hook for the LDAP server form.
theme_ldap_server_ldap_entry_table in ldap_servers/ldap_servers.theme.inc

File

ldap_servers/ldap_servers.test_form.inc, line 157

Code

function ldap_servers_string_binary_check($input) {
  if (preg_match('~[^\\x20-\\x7E\\t\\r\\n]~', $input) > 0) {
    $truncatedString = truncate_utf8($input, 200);
    return t('Binary (excerpt): @excerpt', [
      '@excerpt' => $truncatedString,
    ]);
  }
  else {
    return $input;
  }
}