You are here

public function HtmlTitleFilter::decodeToText in HTML Title 8

Filte string with allow html tags.

1 call to HtmlTitleFilter::decodeToText()
HtmlTitleFilter::decodeToMarkup in src/HtmlTitleFilter.php
Filte string with allow html tags.

File

src/HtmlTitleFilter.php, line 72

Class

HtmlTitleFilter
Drupal\html_title\HtmlTitleFilter.

Namespace

Drupal\html_title

Code

public function decodeToText($str) {
  if (is_array($str)) {
    $str = $this->renderer
      ->renderPlain($str);
  }
  return trim($this
    ->filterXss(Html::decodeEntities((string) $str)));
}