diff --git a/frontend/src/scenes/surveys/SurveyAppearance.tsx b/frontend/src/scenes/surveys/SurveyAppearance.tsx
index 27f593a273ccc..3f1fa5c4074b7 100644
--- a/frontend/src/scenes/surveys/SurveyAppearance.tsx
+++ b/frontend/src/scenes/surveys/SurveyAppearance.tsx
@@ -23,8 +23,8 @@ import {
import { surveysLogic } from './surveysLogic'
import { useValues } from 'kea'
import React, { useEffect, useRef, useState } from 'react'
-import { sanitize } from 'dompurify'
import { PayGateMini } from 'lib/components/PayGateMini/PayGateMini'
+import { sanitizeHTML } from './utils'
interface SurveyAppearanceProps {
type: SurveyQuestionType
@@ -284,12 +284,12 @@ export function BaseAppearance({
)}
-
+
{/* Using dangerouslySetInnerHTML is safe here, because it's taking the user's input and showing it to the same user.
They can try passing in arbitrary scripts, but it would show up only for them, so it's like trying to XSS yourself, where
you already have all the data. Furthermore, sanitization should catch all obvious attempts */}
{description && (
-
+
)}
{type === SurveyQuestionType.Open && (
)}
-
+
{description && (
-
+
)}
@@ -591,9 +591,9 @@ export function SurveyMultipleChoiceAppearance({