The xssProtection property (string) enables the built-in cross-site scripting (XSS) protection in the JavaScript Calendar component.
Available since 2020.4.4701.
DayPilot.Calendar.xssProtection"Enabled" - HTML-encodes text strings supplied through the API.
"Disabled" - leaves developer-supplied text strings unescaped.
"Enabled"When XSS protection is enabled, developer-supplied strings are escaped automatically. If you need custom markup, use API properties intended for HTML content instead of disabling protection globally.
JavaScript
const calendar = new DayPilot.Calendar("dp", {
xssProtection: "Disabled",
// ...
});
calendar.init();Angular
<daypilot-calendar [config]="config"></daypilot-calendar>config: DayPilot.CalendarConfig = {
xssProtection: "Disabled",
// ...
};React
<DayPilotCalendar
xssProtection={"Disabled"}
{/* ... */}
/>Vue
<DayPilotCalendar
:xssProtection="'Disabled'"
<!-- ... -->
/>XSS Protection [doc.daypilot.org]