Download & Extend

Improper usage of t(), broken breadcrumbs

Project:OG Forum
Version:6.x-2.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:paulbooker
Status:closed (fixed)

Issue Summary

This module does not use the t() function properly. This is particularly a problem in the _og_forum_set_breadcrumb() function because it causes the group node's title to be escaped twice. This causes titles that contain special characters such as apostrophes and ampersands to look like a mess.

Only literal strings should be translated. Strings that are completely dynamic, such as $node->title, should not be translated. The attached patch fixes the problem in _og_forum_set_breadcrumb(). I have not reviewed the rest of the module to see if there are additional instances where t() is not used properly.

See http://api.drupal.org/api/function/t/6 for more information.

AttachmentSize
og_forum-fix-breadcrumbs.patch1.49 KB

Comments

#1

Thanks for the heads up.

Would someone like to go through the module and check for other occurrences ?

Best, Paul

#2

Assigned to:Anonymous» paulbooker
Status:needs review» reviewed & tested by the community

This patch and a couple of other related fixes will be committed shortly.

Thanks for the heads up!

Best, Paul

#3

Status:reviewed & tested by the community» fixed

#4

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here