You are here

function sharerich_allowed_tags in Sharerich 8

Helper to return the list of allowed tags from the configuration.

1 call to sharerich_allowed_tags()
SharerichBlock::build in src/Plugin/Block/SharerichBlock.php
Builds and returns the renderable array for this block plugin.

File

./sharerich.module, line 94
Contains sharerich.module..

Code

function sharerich_allowed_tags() {

  // Get list of allowed tags.
  $allowed_tags = \Drupal::config('sharerich.settings')
    ->get('allowed_html');

  // Convert to array.
  $allowed_tags = str_replace([
    '<',
    '>',
  ], '', $allowed_tags);
  $allowed_tags = Html::escape($allowed_tags);
  $allowed_tags = explode(' ', $allowed_tags);
  return $allowed_tags;
}