@@ -24,9 +28,9 @@ import json
- % if notes:
+ % if has_notes:
-
- % if notes:
+ % if has_notes:
@@ -103,12 +107,15 @@ import json
% endfor
%block>
-% if notes:
+% if has_notes:
<%block name="js_extra">
<%static:require_module module_name="js/edxnotes/views/page_factory" class_name="NotesPageFactory">
NotesPageFactory({
- notesList: ${notes if notes is not None else []},
- debugMode: ${debug}
+ disabledTabs: ${disabled_tabs | n, dump_js_escaped_json},
+ notes: ${dump_js_escaped_json(notes, NoteJSONEncoder) | n},
+ notesEndpoint: ${notes_endpoint | n, dump_js_escaped_json},
+ pageSize: ${page_size | n, dump_js_escaped_json},
+ debugMode: ${debug | n, dump_js_escaped_json}
});
%static:require_module>
%block>
diff --git a/lms/templates/edxnotes/note-item.underscore b/lms/templates/edxnotes/note-item.underscore
index 7ec7425c4d..9aaceb98d1 100644
--- a/lms/templates/edxnotes/note-item.underscore
+++ b/lms/templates/edxnotes/note-item.underscore
@@ -1,7 +1,7 @@
<% if (message) { %>
-
<%= message %>
+
<%- message %>
<% if (show_link) { %>
<% if (is_expanded) { %>
<%- gettext('Less') %>
@@ -17,7 +17,12 @@
<% } %>
@@ -38,7 +43,12 @@
<% if (tags.length > 0) { %>
<%- gettext("Tags:") %>
<% for (var i = 0; i < tags.length; i++) { %>
-
<%= tags[i] %>
+
+ <%= interpolate_text(_.escape(tags[i]), {
+ elasticsearch_highlight_start: '',
+ elasticsearch_highlight_end: ''
+ })%>
+
<% } %>
<% } %>