This source file includes following definitions.
- isCSPDirectiveNameCharacter
- isCSPDirectiveValueCharacter
- isBase64EncodedCharacter
- isNonceCharacter
- isSourceCharacter
- isPathComponentCharacter
- isHostCharacter
- isSchemeContinuationCharacter
- isNotASCIISpace
- isNotColonOrSlash
- isMediaTypeCharacter
#include "config.h"
#include "platform/network/ContentSecurityPolicyParsers.h"
#include "wtf/ASCIICType.h"
namespace WebCore {
bool isCSPDirectiveNameCharacter(UChar c)
{
return isASCIIAlphanumeric(c) || c == '-';
}
bool isCSPDirectiveValueCharacter(UChar c)
{
return isASCIISpace(c) || (c >= 0x21 && c <= 0x7e);
}
bool isBase64EncodedCharacter(UChar c)
{
return isASCIIAlphanumeric(c) || c == '+' || c == '/';
}
bool isNonceCharacter(UChar c)
{
return isBase64EncodedCharacter(c) || c == '=';
}
bool isSourceCharacter(UChar c)
{
return !isASCIISpace(c);
}
bool isPathComponentCharacter(UChar c)
{
return c != '?' && c != '#';
}
bool isHostCharacter(UChar c)
{
return isASCIIAlphanumeric(c) || c == '-';
}
bool isSchemeContinuationCharacter(UChar c)
{
return isASCIIAlphanumeric(c) || c == '+' || c == '-' || c == '.';
}
bool isNotASCIISpace(UChar c)
{
return !isASCIISpace(c);
}
bool isNotColonOrSlash(UChar c)
{
return c != ':' && c != '/';
}
bool isMediaTypeCharacter(UChar c)
{
return !isASCIISpace(c) && c != '/';
}
}