Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. BigPipeStrategy.php

function 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 186

Class

BigPipeStrategy
Defines the BigPipe placeholder strategy, to send HTML in chunks.

Namespace

Drupal\big_pipe\Render\Placeholder

Code

protected static function placeholderIsAttributeSafe($placeholder) {
    assert(is_string($placeholder));
    return $placeholder[0] !== '<' || $placeholder !== Html::normalize($placeholder);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal