Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Update allowedTags in sanitizeHtmlBody to include ordered lists

Kiran Kb92ea8544440
diff --git a/apps/web/lib/api/workflows/generate-campaign-email-html.ts b/apps/web/lib/api/workflows/generate-campaign-email-html.ts
index 5db1e65dd9..1c530bc08e 100644
--- a/apps/web/lib/api/workflows/generate-campaign-email-html.ts
+++ b/apps/web/lib/api/workflows/generate-campaign-email-html.ts
@@ -58,7 +58,18 @@ export function generateCampaignEmailHTML({
const sanitizeHtmlBody = (body: string) => {
return sanitizeHtml(body, {
- allowedTags: ["p", "strong", "em", "ul", "li", "a", "h1", "h2", "img"],
+ allowedTags: [
+ "p",
+ "strong",
+ "em",
+ "ul",
+ "ol",
+ "li",
+ "a",
+ "h1",
+ "h2",
+ "img",
+ ],
allowedAttributes: {
a: ["href", "name", "target", "rel"],
img: ["src", "alt", "title"],