Replace JQuery .text by .html
- Prevents inserting unescaped HTML in page
This commit is contained in:
parent
ba0d3b2435
commit
b2c4116357
12 changed files with 20 additions and 19 deletions
|
@ -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> ';
|
||||
var eventsum = $("#modal-body .event-wrapper .event-summary").text();
|
||||
var eventsum = $("#modal-body .event-wrapper .event-summary").html();
|
||||
title = title + eventsum;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue