From 145a3f80ce957267fdd6f6227922847b116f2e72 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 27 Oct 2009 19:35:21 -0700 Subject: Guard against developers who forget to internationalize label strings --- modules/gallery/libraries/Menu.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'modules') diff --git a/modules/gallery/libraries/Menu.php b/modules/gallery/libraries/Menu.php index fba21e09..20405317 100644 --- a/modules/gallery/libraries/Menu.php +++ b/modules/gallery/libraries/Menu.php @@ -43,6 +43,11 @@ class Menu_Element { * @chainable */ public function label($label) { + // Guard against developers who forget to internationalize label strings + if (!($label instanceof SafeString)) { + $label = new SafeString($label); + } + $this->label = $label; return $this; } -- cgit v1.2.3