41 if (!$this->selector && !
$config->get(
'Attr.EnableID')) {
51 $prefix =
$config->get(
'Attr.IDPrefix');
53 $prefix .=
$config->get(
'Attr.IDPrefixLocal');
55 if (strpos(
$id, $prefix) !== 0) {
58 } elseif (
$config->get(
'Attr.IDPrefixLocal') !==
'') {
60 '%Attr.IDPrefixLocal cannot be used unless ' .
61 '%Attr.IDPrefix is set',
66 if (!$this->selector) {
67 $id_accumulator =& $context->get(
'IDAccumulator');
68 if (isset($id_accumulator->ids[
$id])) {
75 if (
$config->get(
'Attr.ID.HTML5') ===
true) {
76 if (preg_match(
'/[\t\n\x0b\x0c ]/',
$id)) {
80 if (ctype_alpha(
$id)) {
83 if (!ctype_alpha(@
$id[0])) {
97 $regexp =
$config->get(
'Attr.IDBlacklistRegexp');
98 if ($regexp && preg_match($regexp,
$id)) {
102 if (!$this->selector) {
103 $id_accumulator->add(
$id);
Base class for all validating attribute definitions.
validate($id, $config, $context)
if(!array_key_exists('StateId', $_REQUEST)) $id
__construct($selector=false)
$selector
Determines whether or not we're validating an ID in a CSS selector context.
Validates the HTML attribute ID.