MDL-47583 tinymce_managefiles: correctly decode filename
authorMarina Glancy <marina@moodle.com>
Thu, 9 Oct 2014 02:54:46 +0000 (10:54 +0800)
committerMarina Glancy <marina@moodle.com>
Thu, 9 Oct 2014 02:59:21 +0000 (10:59 +0800)
lib/editor/tinymce/plugins/managefiles/tinymce/editor_plugin.js

index f3bb3e9..5b3c102 100644 (file)
@@ -83,7 +83,7 @@
                     patt = new RegExp(base.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&') + "(.+?)[\\?\"']", 'gm'),
                     arr = [], match, filename;
                 while ((match = patt.exec(text)) !== null) {
-                    filename = unescape(match[1]);
+                    filename = decodeURI(match[1]);
                     if (arr.indexOf(filename) === -1) {
                         arr[arr.length] = filename;
                     }