diff --git a/src/classes/CampaignCalendar.cls b/src/classes/CampaignCalendar.cls index 1b32595..42a34cc 100644 --- a/src/classes/CampaignCalendar.cls +++ b/src/classes/CampaignCalendar.cls @@ -115,7 +115,7 @@ public with sharing class CampaignCalendar { whereClause += ' AND Type = :type '; } - String query = 'SELECT ' + String.join(queryFields(), ',') + ' FROM Campaign WHERE ' + whereClause + ' WITH SECURITY_ENFORCED'; + String query = 'SELECT ' + String.escapeSingleQuotes(String.join(queryFields(), ',')) + ' FROM Campaign WHERE ' + whereClause + ' WITH SECURITY_ENFORCED'; List campaigns = (List)Database.query(query); List calendarEntries = new List(); diff --git a/src/pages/CampaignCalendar.page b/src/pages/CampaignCalendar.page index ef4602d..a074c4a 100644 --- a/src/pages/CampaignCalendar.page +++ b/src/pages/CampaignCalendar.page @@ -53,13 +53,13 @@ - {{if '{!f.FieldPath}' == 'OwnerId'}} + {{if '{!JSENCODE(f.FieldPath)}' == 'OwnerId'}} {{else}} - - + {{/if}}
Owner {{>Owner.Name}}{!f.Label} - {{:~formatData({!f.FieldPath},'{!f.type}','{!f.FieldPath}')}} + {!JSENCODE(f.Label)} + {{:~formatData({!JSENCODE(f.FieldPath)},'{!JSENCODE(f.type)}','{!JSENCODE(f.FieldPath)}')}}