diff --git a/lib/moodlelib.php b/lib/moodlelib.php index b84db8c1ac6..97952904170 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -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/' );