From 0f0a66ae5d6131391e6e004626ae272e0a19b9b2 Mon Sep 17 00:00:00 2001 From: Conrad Crawford <83192247+cnrad@users.noreply.github.com> Date: Wed, 10 Nov 2021 22:22:20 -0500 Subject: [PATCH] fix: escape more html to avoid xml parsing errors --- src/renderCard.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/renderCard.tsx b/src/renderCard.tsx index cefbdaf..ac7cf3a 100644 --- a/src/renderCard.tsx +++ b/src/renderCard.tsx @@ -335,7 +335,7 @@ const renderCard = async (body: LanyardTypes.Root, params: Parameters): Promise< text-overflow: ellipsis; height: 15px; margin: 7px 0; - ">${activity.name}

+ ">${escape(activity.name)}

${ activity.details ? ` @@ -347,7 +347,7 @@ const renderCard = async (body: LanyardTypes.Root, params: Parameters): Promise< text-overflow: ellipsis; height: 15px; margin: 7px 0; - ">${activity.details}

` + ">${escape(activity.details)}

` : `` } ${ @@ -361,7 +361,7 @@ const renderCard = async (body: LanyardTypes.Root, params: Parameters): Promise< text-overflow: ellipsis; height: 15px; margin: 7px 0; - ">${activity.state}${ + ">${escape(activity.state)}${ activity.party && activity.party.size ? ` (${activity.party.size[0]} of ${activity.party.size[1]})` : ""