MDL-45387 core_form: erroneous escaping on reference list
authorJetha Chan <jetha@moodle.org>
Wed, 7 May 2014 02:52:51 +0000 (10:52 +0800)
committerJetha Chan <jetha@moodle.org>
Wed, 7 May 2014 02:52:51 +0000 (10:52 +0800)
Fixed erroneous escaping in JS.

lib/form/filemanager.js

index 7f271b3..a2c7cd7 100644 (file)
@@ -1012,9 +1012,9 @@ M.form_filemanager.init = function(Y, options) {
                             if (obj.references) {
                                 node.reflist = '';
                                 for (var i in obj.references) {
-                                    node.reflist += '<li>'+obj.references[i]+'</li>';
+                                    node.reflist += '<li>'+Y.Escape.html(obj.references[i])+'</li>';
                                 }
-                                selectnode.one('.fp-reflist .fp-value').setContent(Y.Escape.html(node.reflist));
+                                selectnode.one('.fp-reflist .fp-value').setContent(node.reflist);
                             } else {
                                 selectnode.one('.fp-reflist .fp-value').setContent('');
                             }