Strange letters in title

Sophia - April 13, 2007 - 20:12
Project:userreview
Version:5.x-1.x-dev
Component:User interface
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

I changed the Review Forum settings to Share your opinion on %node_title!

However on the page it comes out as Share your opinion on <em>11-Field Soccer</em>!

What did I do wrong? Thanks

#1

Michelle - May 19, 2007 - 21:57

I had the same problem and did some digging and asking on IRC. The way the code is doing the t() in combination with check_plain is causing these odd characters.

To fix it requires changing the module code:

function get_userreview_form_title($node) {
  $display_title = variable_get('userreview_form_title', t('Share your opinion!'));
  $node_translation_terms = array(
    '@node_type' => node_get_types('name', $node),
    '@node_title' => $node->title,
  );
  $display_title = t($display_title, $node_translation_terms);

Those @ signs are currently %. Make that change and then, on the settings page, use @node_title instead.

Michelle

 
 

Drupal is a registered trademark of Dries Buytaert.