Skip to content

Commit

Permalink
Fix: deprecated usage
Browse files Browse the repository at this point in the history
  • Loading branch information
crazywoola committed Sep 14, 2024
1 parent 30ffe19 commit 422cac7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion web/app/components/base/svg-gallery/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ export const SVGRenderer = ({ content }: { content: string }) => {

const svgToDataURL = (svgElement: Element): string => {
const svgString = new XMLSerializer().serializeToString(svgElement)
return `data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(svgString)))}`
const base64String = Buffer.from(svgString).toString('base64')
return `data:image/svg+xml;base64,${base64String}`
}

useEffect(() => {
Expand Down

0 comments on commit 422cac7

Please sign in to comment.