Replace JQuery .text by .html

- Prevents inserting unescaped HTML in page
This commit is contained in:
Hypolite Petovan 2020-11-16 18:16:20 -05:00
commit b2c4116357
12 changed files with 20 additions and 19 deletions

View file

@ -192,12 +192,12 @@ function loadModalTitle() {
var title = "";
// Get the text of the first element with "heading" class.
title = $("#modal-body .heading").first().text();
title = $("#modal-body .heading").first().html();
// for event modals we need some speacial handling
if($("#modal-body .event-wrapper .event-summary").length) {
title = '<i class="fa fa-calendar" aria-hidden="true"></i>&nbsp;';
var eventsum = $("#modal-body .event-wrapper .event-summary").text();
var eventsum = $("#modal-body .event-wrapper .event-summary").html();
title = title + eventsum;
}