def _contains_special_directive(directive_definition):
 if (directive_definition is None):
  return False
 if (len(directive_definition.strip()) == 0):
  return False
 special_directive_names = [CSP_DIRECTIVE_SANDBOX, CSP_DIRECTIVE_SCRIPT_NONCE]
 tmp = directive_definition.lower()
 for special_directive in special_directive_names:
  if (special_directive in tmp):
   return True
 return False

def _contains_special_directive ( directive_definition ) : if ( directive_definition is None ) : return False if ( len ( directive_definition . strip ( ) ) == 0 ) : return False special_directive_names = [ CSP_DIRECTIVE_SANDBOX , CSP_DIRECTIVE_SCRIPT_NONCE ] tmp = directive_definition . lower ( ) for special_directive in special_directive_names : if ( special_directive in tmp ) : return True return False
internal method to detect in a directive specification if a "special" directive is used .