The xssProtection property (string) enables the built-in cross-site scripting (XSS) protection in the JavaScript Calendar component.
Available since 2020.4.4701.
Declaration
DayPilot.Calendar.xssProtectionPossible Values
"Enabled"- HTML-encodes text strings supplied through the API."Disabled"- leaves developer-supplied text strings unescaped.
Default Value
"Enabled"Notes
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.
Examples
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'"
<!-- ... -->
/>See Also
XSS Protection [doc.daypilot.org]
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot