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

Breadcrumb

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

function OutputRules::text

Write a text node.

Parameters

\DOMText $ele The text node to write.:

Overrides RulesInterface::text

File

vendor/masterminds/html5/src/HTML5/Serializer/OutputRules.php, line 261

Class

OutputRules
Generate the output html5 based on element rules.

Namespace

Masterminds\HTML5\Serializer

Code

public function text($ele) {
    if (isset($ele->parentNode) && isset($ele->parentNode->tagName) && Elements::isA($ele->parentNode->localName, Elements::TEXT_RAW)) {
        $this->wr($ele->data);
        return;
    }
    // FIXME: This probably needs some flags set.
    $this->wr($this->enc($ele->data));
}

API Navigation

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