Skip to content

Commit

Permalink
feat: allow the iframe that allows the images created by bing image c…
Browse files Browse the repository at this point in the history
…reator to be shown (#118)

* allow the images created by Bing Image Creator to be shown.

* Automatically adjust the height of the input box according to user input, the maximum height is half of the current window height.

* feat: allow the images created by Bing Image Creator to be shown.

* feat: automatically adjust the height of the input box according to user input, the maximum height is half of the current window height.

* Revert "Automatically adjust the height of the input box according to user input, the maximum height is half of the current window height."

This reverts commit c644f01.

* Revert "feat: automatically adjust the height of the input box according to user input, the maximum height is half of the current window height."

This reverts commit b9c5341.

---------

Co-authored-by: robin <skyfox@cloudendless.com>
  • Loading branch information
timefox and robin authored May 28, 2023
1 parent 0a3d092 commit 2ce692e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/Chat.vue
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,8 @@ const parseMarkdown = (text, streaming = false) => {
// 2. replace "^1^" with "[1]" (after the progress stream is done)
parsed = parsed.replace(/\^(\d+)\^/g, '<strong>[$1]</strong>');
return DOMPurify.sanitize(parsed);
// Allow the iframe to show the images created by Bing Image Creator.
return DOMPurify.sanitize(parsed, { ADD_TAGS: ['iframe'], ADD_ATTR: ['allow', 'allowfullscreen', 'frameborder', 'scrolling', 'srcdoc'] });
} catch (err) {
console.error('ERROR', err);
return text;
Expand Down

0 comments on commit 2ce692e

Please sign in to comment.