-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: apostrophe-issue-richtext #1314
base: main
Are you sure you want to change the base?
Conversation
- Introduced a new utility function `decodeHtmlEntities` to decode HTML entities in strings. - Updated `convertAttributesInElement` to handle string children by decoding HTML entities before processing. - Enhanced the handling of text nodes to ensure proper rendering of HTML content in React elements.
commit: |
import React from 'react'; | ||
import { BrowserRouter, Link, Route, Routes } from 'react-router'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure we want to make our React playground dependent on react-router
honestly, is this needed?
@@ -11,7 +11,7 @@ import { apiPlugin, storyblokInit } from '@storyblok/react'; | |||
import IFrameEmbed from './components/iframe-embed'; | |||
|
|||
storyblokInit({ | |||
accessToken: 'd6IKUtAUDiKyAhpJtrLFcwtt', | |||
accessToken: 'OurklwV5XsDJTIE1NJaD2wtt', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to document which space is associated with these demo token, or it would be a mess to test them later
@@ -1,5 +1,11 @@ | |||
import React from 'react'; | |||
|
|||
function decodeHtmlEntities(text: string): string { | |||
const textarea = document.createElement('textarea'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this would break in SSR because of the use of document
on the server
decodeHtmlEntities
to decode HTML entities in strings.convertAttributesInElement
to handle string children by decoding HTML entities before processing.