You are here

public static function XPath::filterAttrName in SAML SP 2.0 Single Sign On (SSO) - SAML Service Provider 8

Filter an attribute name for save inclusion in an XPath query.

Parameters

string $name The attribute name to filter.:

mixed $allow The set of characters to allow. Can be one of the constants provided by this class, or a: custom regex excluding the '#' character (used as delimiter).

Return value

string The filtered attribute name.

1 call to XPath::filterAttrName()
XMLSecurityDSig::processRefNode in src/XMLSecurityKey.php

File

src/XMLSecurityKey.php, line 44

Class

XPath

Namespace

Drupal\miniorange_saml

Code

public static function filterAttrName($name, $allow = self::EXTENDED_ALPHANUMERIC) {
  return preg_replace('#[^' . $allow . ']#', '', $name);
}