You are here

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

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 includes/XMLSecurityKey.php

File

includes/XMLSecurityKey.php, line 77

Class

XPath
xmlseclibs.php

Code

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