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

Breadcrumb

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

function DefaultHtmlToTextConverter::convert

Overrides HtmlToTextConverterInterface::convert

File

vendor/symfony/mime/HtmlToTextConverter/DefaultHtmlToTextConverter.php, line 19

Class

DefaultHtmlToTextConverter
@author Fabien Potencier <fabien@symfony.com>

Namespace

Symfony\Component\Mime\HtmlToTextConverter

Code

public function convert(string $html, string $charset) : string {
    return strip_tags(preg_replace('{<(head|style)\\b.*?</\\1>}is', '', $html));
}

API Navigation

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