I have a taxonomy term that includes an apostrophe in the French translation, but the apostrophe is being rendered as ' -- I believe this indicates it is being run through check_plain twice. If anybody can give me some pointers as to where I would look to find this second check_plain, I can try to prepare a patch.

Members fund testing for the Drupal project. Drupal Association Learn more


Jibus’s picture

Same issue here..

I used drupal_entities() in my view template in order to resolve this.

the function is here (i18nviews_handler_field_term_node_tid.inc):

        $this->items[$term->node_nid][$term->tid]['name'] = check_plain($name);
        $this->items[$term->node_nid][$term->tid]['tid'] = $term->tid;
        $this->items[$term->node_nid][$term->tid]['vocabulary_machine_name'] = check_plain($term->vocabulary_machine_name);
        $this->items[$term->node_nid][$term->tid]['vocabulary'] = check_plain($term->vocabulary);

line 36, 38 & 39

fietserwin’s picture

Another place where it goes wrong is when presenting an exposed hierarchical select list of taxonomy terms. Incorrect code:

ScreenHunter_30 Dec. 03.jpg

Corrected code:
ScreenHunter_31 Dec. 03.jpg

In this case the code is at line 50 of file i18nviews_handler_filter_taxonomy_index_tid.inc:

            $choice->option = array($term->tid => str_repeat('-', $term->depth) . check_plain(i18n_taxonomy_term_name($term)));

should be:

            $choice->option = array($term->tid => str_repeat('-', $term->depth) . i18n_taxonomy_term_name($term));

Note that I needed to install i18n version 7.x-1.7 (instead of 7.x-1.5) to solve it in a flat exposed list.