Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
#6 | apachesolr-facet-label-encoded-twice-2180027-6.patch | 666 bytes | mduvergey |
#4 | apachesolr-facet-label-encoded-twice-2180027-4.patch | 906 bytes | mduvergey |
#1 | facet_html_encoded_twice.png | 10.57 KB | mduvergey |
Comments
Comment #1
mduvergey CreditAttribution: mduvergey commentedComment #2
mduvergey CreditAttribution: mduvergey commentedComment #3
Nick_vhCould 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.
Comment #4
mduvergey CreditAttribution: mduvergey commentedHi,
Postponed this for a while but here is a patch :-)
Martin
Comment #6
mduvergey CreditAttribution: mduvergey commentedRe-submitting patch with correct directory information.
Comment #7
mduvergey CreditAttribution: mduvergey commentedComment #8
mduvergey CreditAttribution: mduvergey commented