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

Breadcrumb

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

function OutputFormatter::escape

Escapes "<" and ">" special chars in given text.

18 calls to OutputFormatter::escape()
Application::doRenderThrowable in vendor/symfony/console/Application.php
Application::renderThrowable in vendor/symfony/console/Application.php
Auditor::getPackageNameWithLink in vendor/composer/composer/src/Composer/Advisory/Auditor.php
Auditor::getURL in vendor/composer/composer/src/Composer/Advisory/Auditor.php
Auditor::outputAdvisoriesPlain in vendor/composer/composer/src/Composer/Advisory/Auditor.php

... See full list

File

vendor/symfony/console/Formatter/OutputFormatter.php, line 40

Class

OutputFormatter
Formatter class for console output.

Namespace

Symfony\Component\Console\Formatter

Code

public static function escape(string $text) : string {
    $text = preg_replace('/([^\\\\]|^)([<>])/', '$1\\\\$2', $text);
    return self::escapeTrailingBackslash($text);
}

API Navigation

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