Improper usage of t(), broken breadcrumbs
jtsnow - September 23, 2009 - 01:01
| Project: | OG Forum |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | paulbooker |
| Status: | closed |
Jump to:
Description
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.
| Attachment | Size |
|---|---|
| og_forum-fix-breadcrumbs.patch | 1.49 KB |

#1
Thanks for the heads up.
Would someone like to go through the module and check for other occurrences ?
Best, Paul
#2
This patch and a couple of other related fixes will be committed shortly.
Thanks for the heads up!
Best, Paul
#3
#4
Automatically closed -- issue fixed for 2 weeks with no activity.