protected static function BigPipeStrategy::placeholderIsAttributeSafe in Drupal 9
Same name and namespace in other branches
- 8 core/modules/big_pipe/src/Render/Placeholder/BigPipeStrategy.php \Drupal\big_pipe\Render\Placeholder\BigPipeStrategy::placeholderIsAttributeSafe()
Determines whether the given placeholder is attribute-safe or not.
Parameters
string $placeholder: A placeholder.
Return value
bool Whether the placeholder is safe for use in an HTML attribute (in case it's a placeholder for an HTML attribute value or a subset of it).
1 call to BigPipeStrategy::placeholderIsAttributeSafe()
- BigPipeStrategy::doProcessPlaceholders in core/
modules/ big_pipe/ src/ Render/ Placeholder/ BigPipeStrategy.php - Transforms placeholders to BigPipe placeholders, either no-JS or JS.
File
- core/
modules/ big_pipe/ src/ Render/ Placeholder/ BigPipeStrategy.php, line 182
Class
- BigPipeStrategy
- Defines the BigPipe placeholder strategy, to send HTML in chunks.
Namespace
Drupal\big_pipe\Render\PlaceholderCode
protected static function placeholderIsAttributeSafe($placeholder) {
assert(is_string($placeholder));
return $placeholder[0] !== '<' || $placeholder !== Html::normalize($placeholder);
}