FilterHtmlCorrector.php
Same filename in other branches
Namespace
Drupal\filter\Plugin\FilterFile
-
core/
modules/ filter/ src/ Plugin/ Filter/ FilterHtmlCorrector.php
View source
<?php
namespace Drupal\filter\Plugin\Filter;
use Drupal\Component\Utility\Html;
use Drupal\Core\StringTranslation\TranslatableMarkup;
use Drupal\filter\Attribute\Filter;
use Drupal\filter\FilterProcessResult;
use Drupal\filter\Plugin\FilterBase;
use Drupal\filter\Plugin\FilterInterface;
/**
* Provides a filter to correct faulty and chopped off HTML.
*/
class FilterHtmlCorrector extends FilterBase {
/**
* {@inheritdoc}
*/
public function process($text, $langcode) {
return new FilterProcessResult(Html::normalize($text));
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
FilterHtmlCorrector | Provides a filter to correct faulty and chopped off HTML. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.