MDL-54609 blocks_navigation: Fix display of navigation nodes
authorJun Pataleta <jun@moodle.com>
Thu, 19 May 2016 09:15:06 +0000 (17:15 +0800)
committerJun Pataleta <jun@moodle.com>
Thu, 19 May 2016 12:43:54 +0000 (20:43 +0800)
* Used jQuery.append() instead of jQuery.text() to append the node's
  name so that it won't be escaped twice since the name is already being
  escaped in the server side via htmlentities.

blocks/navigation/amd/build/ajax_response_renderer.min.js
blocks/navigation/amd/src/ajax_response_renderer.js

index 6d80a9f..98bf2b6 100644 (file)
Binary files a/blocks/navigation/amd/build/ajax_response_renderer.min.js and b/blocks/navigation/amd/build/ajax_response_renderer.min.js differ
index 5246ecf..41b9b45 100644 (file)
@@ -96,7 +96,7 @@ define(['jquery'], function($) {
                     link.append(icon);
                     link.append('<span class="item-content-wrap">'+node.name+'</span>');
                 } else {
-                    link.text(node.name);
+                    link.append(node.name);
                 }
 
                 if (node.hidden) {
@@ -111,7 +111,7 @@ define(['jquery'], function($) {
                     span.append(icon);
                     span.append('<span class="item-content-wrap">'+node.name+'</span>');
                 } else {
-                    span.text(node.name);
+                    span.append(node.name);
                 }
 
                 if (node.hidden) {