The tab title is passed throughcheck_plain() and t() twice, once in template_preprocess_bootstrap_fieldgroup_nav() and once in field_group_pre_render_bootstrap_fieldgroup_nav_item().

Comments

adam-delaney’s picture

Running these variables through both the check_plain() and t() is not causing the double encoding and both functions are important in order to have localization and security. I am providing an updated path that encodes the strings once they have been ran through their other functions.

mstrelan’s picture

Original patch still runs it through both t() and check_plain(), but prevents this from happening twice.

ckng’s picture

Status: Needs review » Closed (works as designed)

For this case, you will need to handle the title yourself. Title and label are plain text per Drupal core.

Best place is in preprocess functions.
E.g. (not tested)

function YOUR_THEME_OR_MODULE_preprocess_bootstrap_fieldgroup_accordion(&$variables) {
  foreach ($variables['items'] as $key => $item) {
    $variables['panels'][$key]['label'] = decode_entities($variables['panels'][$key]['label']);
    // OR other way to access the value, do pass through check_plain() first.
  }
}