From 9fe006262d2e51fe5dafb1bc11f297bc1eeb976a Mon Sep 17 00:00:00 2001 From: bluecloud <96812901+pitb2022@users.noreply.github.com> Date: Mon, 2 Sep 2024 14:43:22 +0800 Subject: [PATCH] fix(MomentDetail): sanitize content --- src/views/MomentDetail/Edit/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/views/MomentDetail/Edit/index.tsx b/src/views/MomentDetail/Edit/index.tsx index 36fe6f8711..e7d4638547 100644 --- a/src/views/MomentDetail/Edit/index.tsx +++ b/src/views/MomentDetail/Edit/index.tsx @@ -8,6 +8,7 @@ import { CLEAR_MOMENT_FORM, MAX_MOMENT_CONTENT_LENGTH } from '~/common/enums' import { formStorage, parseFormSubmitErrors, + sanitizeContent, stripHtml, toPath, } from '~/common/utils' @@ -84,7 +85,7 @@ const Edit = () => { const { data } = await putMoment({ variables: { input: { - content, + content: sanitizeContent(content), assets: assets.map(({ assetId }) => assetId), }, },