@blocklet/pages-kit 0.2.397 → 0.2.398

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -23,6 +23,7 @@ import { RuntimeOutputVariable } from '@blocklet/ai-runtime/types';
23
23
  import { Icon } from '@iconify/react';
24
24
  import { Box, Stack, styled } from '@mui/material';
25
25
  import { saveAs } from 'file-saver';
26
+ import DOMPurify from 'isomorphic-dompurify';
26
27
  import { useMemo } from 'react';
27
28
  import { joinURL, withQuery } from 'ufo';
28
29
  import { useLocaleContext } from '../../../../locale';
@@ -153,9 +154,9 @@ function ShareSave({ inputs, shareAttach, }) {
153
154
  element.innerHTML += `<p><a href="{${link}}">${link}</a></p>`;
154
155
  }
155
156
  if (shareAttach.shareAttachInputs) {
156
- element.innerHTML += `<p><blockquote>${inputs}</blockquote></p>`;
157
+ element.innerHTML += `<p><blockquote>${DOMPurify.sanitize(inputs)}</blockquote></p>`;
157
158
  }
158
- element.innerHTML += `<p>${content}</p>`;
159
+ element.innerHTML += `<p>${DOMPurify.sanitize(content)}</p>`;
159
160
  yield html2pdf()
160
161
  .set({
161
162
  margin: 1,