Permalink
Browse files

Guard against developers who forget to internationalize label strings

  • Loading branch information...
1 parent cb0243b commit 145a3f80ce957267fdd6f6227922847b116f2e72 @bharat bharat committed Oct 28, 2009
Showing with 5 additions and 0 deletions.
  1. +5 −0 modules/gallery/libraries/Menu.php
@@ -43,6 +43,11 @@ public function id($id) {
* @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;
}

0 comments on commit 145a3f8

Please sign in to comment.