Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
RemoveTags.php
Go to the documentation of this file.
1 <?php
7 
12 {
19  protected function _convertEntities($matches)
20  {
21  return htmlentities($matches[0]);
22  }
23 
30  public function filter($value)
31  {
32  $value = preg_replace_callback(
33  "# <(?![/a-z]) | (?<=\s)>(?![a-z]) #xi",
34  [$this, '_convertEntities'],
35  $value
36  );
37  $value = htmlspecialchars_decode($value);
38 
39  return strip_tags($value);
40  }
41 }
$value
Definition: gender.phtml:16