diff --git a/users/simon/modules/sway/waybar.nix b/users/simon/modules/sway/waybar.nix
index 10f8e27..17aa46a 100644
--- a/users/simon/modules/sway/waybar.nix
+++ b/users/simon/modules/sway/waybar.nix
@@ -223,6 +223,7 @@ in
interval = 300;
exec = pkgs.writeScript "calendar" /* python */ ''
#!${pkgs.python3}/bin/python3
+ import html
import json
import subprocess
@@ -234,7 +235,21 @@ in
events_today = khal(["list", "today", "today", "-df", "", "-f", "{title}"]).rstrip().split("\n")
- events_2d = khal(["list", "today", "tomorrow", "-df", "{name}, {date}"]).rstrip()
+ events_2d = (
+ html.escape(
+ khal(
+ [
+ "list",
+ "today",
+ "tomorrow",
+ "-df",
+ "WAYBARSTARTKHAL{name}, {date}WAYBARENDKHAL",
+ ]
+ ).rstrip()
+ )
+ .replace("WAYBARSTARTKHAL", "")
+ .replace("WAYBARENDKHAL", "")
+ )
if len(events_today) == 1 and events_today[0] == "No events":
events_today = []