diff --git a/src/modules/popdowns/updates.tsx b/src/modules/popdowns/updates.tsx
index b4b4a637..0cf7d1f2 100644
--- a/src/modules/popdowns/updates.tsx
+++ b/src/modules/popdowns/updates.tsx
@@ -2,7 +2,7 @@ import Palette from "@/services/palette";
import Updates, { Repo as IRepo, Update as IUpdate } from "@/services/updates";
import { MenuItem } from "@/utils/widgets";
import PopdownWindow from "@/widgets/popdownwindow";
-import { bind, execAsync, Variable } from "astal";
+import { bind, execAsync, GLib, Variable } from "astal";
import { App, Astal, Gtk } from "astal/gtk3";
const constructItem = (label: string, exec: string, quiet = true) =>
@@ -33,7 +33,12 @@ const Update = (update: IUpdate) => {
xalign={0}
label={bind(Palette.get_default(), "colours").as(
c =>
- `${update.name} (${update.version.old} -> ${update.version.new})\n ${update.description}`
+ `${update.name} (${update.version.old} -> ${
+ update.version.new
+ })\n ${GLib.markup_escape_text(
+ update.description,
+ update.description.length
+ )}`
)}
/>
@@ -69,6 +74,11 @@ const Repo = ({ repo, first }: { repo: IRepo; first?: boolean }) => {
const News = ({ news }: { news: string }) => {
const expanded = Variable(true);
+ news = news
+ .replaceAll("\n\n\x1b", "\n\n") // Remove unopened \x1b[0m after each piece of news
+ .replace(/^([0-9]{4}-[0-9]{2}-[0-9]{2} .+)$/gm, "$1") // Make titles bold
+ .replaceAll("\x1b[0m", ""); // Replace reset code with end span
+
return (