Hi,

In function apachesolr_entity_field_facets() each facet's label is processed though check_plain() :

$facets[$field] = array(
          'label' => check_plain($field_info['display_name']),
          'dependency plugins' => $field_info['dependency plugins'],
          'field api name' => $field_info['field']['field_name'],
          'description' => t('Filter by field @field of type @type.', array(
            '@type' => $field_info['field']['type'],
            '@field' => $field_info['field']['field_name'],
          )),
          'map callback' => $field_info['map callback'],
          'map options' => $field_info,
          'hierarchy callback' => $field_info['hierarchy callback'],
        );

The problem is the label is processed again through check_plain() in various places in the facetapi module like theme_facet_api_realm_settings_table() or theme_facetapi_title() thus resulting in incorrect label display in facet blocks or facet settings pages (see attached file for an example).

So I think the call to check_plain() in function apachesolr_entity_field_facets() should be removed, unless I'm missing something?

Regards,

Martin

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mduvergey’s picture

Issue summary: View changes
FileSize
10.57 KB
mduvergey’s picture

Title: Facet label is processed twice through check_plain() » Facet label is processed through check_plain() twice
Nick_vh’s picture

Status: Active » Needs work

Could you make a patch for this? Thanks for your contribution! It's very much appreciated and I hope you continue to contribute to our issue queue. We can use all the help we can get.

mduvergey’s picture

Version: 7.x-1.6 » 7.x-1.7
Status: Needs work » Needs review
FileSize
906 bytes

Hi,

Postponed this for a while but here is a patch :-)

Martin

Status: Needs review » Needs work

The last submitted patch, 4: apachesolr-facet-label-encoded-twice-2180027-4.patch, failed testing.

mduvergey’s picture

Re-submitting patch with correct directory information.

mduvergey’s picture

Status: Needs work » Needs review
mduvergey’s picture

Version: 7.x-1.7 » 7.x-1.x-dev