From 7c56e8623ba81cba6324ff1c80d49adab9c181be Mon Sep 17 00:00:00 2001 From: scyrma Date: Wed, 30 Jul 2008 10:19:35 +0000 Subject: [PATCH] MDL-15688: readability improvement to the script --- lib/editor/tinymce/create_langfiles.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/editor/tinymce/create_langfiles.php b/lib/editor/tinymce/create_langfiles.php index 04b667f740..600f29b502 100755 --- a/lib/editor/tinymce/create_langfiles.php +++ b/lib/editor/tinymce/create_langfiles.php @@ -71,7 +71,7 @@ function write_language_file($lang, $langdata) { fwrite($file, "/* this file was automatically imported from TinyMCE's translations */\n"); foreach($langdata as $id => $line) { // the next two lines are there to make you enjoy how php deals with backslashes - $line = preg_replace_callback('/\\\\u([\dABCDEF]{4})/', 'unichr', $line); // we're matching something like \u00E9 + $line = preg_replace_callback('/\\\\u([0-9A-F]{4})/', 'unichr', $line); // we're matching something like \u00E9 // we're only escaping single quotes, but we gotta prevent escaping those that have already been escaped. fwrite($file, '$string[\''. $id ."']='". strtr($line, array('\\\'' => '\\\'', '\'' => '\\\'')) ."';\n"); } -- 2.39.5