Escape % signs in get_string() function optional parameter. Bug #3527

This commit is contained in:
thepurpleblob
2005-06-20 09:08:48 +00:00
parent fc823bf378
commit ecc0c8b802
+3
View File
@@ -4311,6 +4311,9 @@ function get_string($identifier, $module='', $a=NULL) {
$module = 'moodle';
}
// if $a happens to have % in it, double it so sprintf() doesn't break
$a = str_replace( '%','%%',$a );
/// Define the two or three major locations of language strings for this module
$locations = array( $CFG->dataroot.'/lang/', $CFG->dirroot.'/lang/' );