löschung/deaktiverung
This commit is contained in:
@@ -2242,28 +2242,14 @@ class ApiKernel
|
||||
if ($hasHtmlAttrs) return true;
|
||||
if (preg_match($jsonTypePattern, $html) && preg_match($jsonIdPattern, $html)) return true;
|
||||
|
||||
$kindPattern = '/data-lib-(?:kind|section)\s*=\s*(["\"])([^"\']+)\1/i';
|
||||
$libIdPattern = '/data-lib-id\s*=\s*(["\"])' . $id . '\1/i';
|
||||
if (preg_match($libIdPattern, $html)) {
|
||||
if (!$libKinds) return true;
|
||||
if (preg_match($kindPattern, $html, $m)) {
|
||||
$kind = strtolower(trim((string)($m[2] ?? '')));
|
||||
if ($kind === '' || in_array($kind, $libKinds, true)) return true;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
$jsonLibIdPattern = '/"data-lib-id"\s*:\s*("?)(?:' . $id . ')\1/i';
|
||||
$jsonLibKindPattern = '/"data-lib-(?:kind|section)"\s*:\s*"([^"]+)"/i';
|
||||
if (preg_match($jsonLibIdPattern, $html)) {
|
||||
if (!$libKinds) return true;
|
||||
if (preg_match($jsonLibKindPattern, $html, $m)) {
|
||||
$kind = strtolower(trim((string)($m[1] ?? '')));
|
||||
if ($kind === '' || in_array($kind, $libKinds, true)) return true;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user