You are here

public static function FeedImportFilter::stripTags in Feed Import 8

Same name in this branch
  1. 8 feed_import_base/filters/feed_import_default_filters.php \FeedImportFilter::stripTags()
  2. 8 feed_import_base/src/Filter/FeedImportFilter.php \Drupal\feed_import_base\FeedImportFilter::stripTags()

Strips tags

Parameters

mixed $field: A string or an array of strings

string $tags: Allowed tags

Return value

mixed Result without tags

File

feed_import_base/src/Filter/FeedImportFilter.php, line 597

Class

FeedImportFilter
This class contains default filters for feed import.

Namespace

Drupal\feed_import_base

Code

public static function stripTags($field, $tags = '') {
  if (is_array($field)) {
    foreach ($field as &$f) {
      $f = self::stripTags($f, $tags);
    }
    return $field;
  }
  return strip_tags($field, $tags);
}