Comments (6)
@Yobro7292 Yeah, I know these workarounds, but I still think React should support all the standard character references.
i could not see that bug
@XudayfiIbra The first row of the table in the demo is an example of a supported character reference: ©
gets printed as ©. The other rows represent unsupported character references: each reference, like ⦰
, gets printed as is.
from react.
@check below code .
use html-entities for unsupported symbols .
refer website - https://tools.w3cub.com/html-entities
```
Test: HTML character references in React
Reference Expected character Actual rendering © © © ⦰ ⦰ ⦰ ✓ ✓ ✓ ★ ★ ⋆ ⁠ {'\u2060'}
from react.
i could not see that bug
from react.
There are two approaches
- Convert entities to their corresponding Unicode characters before rendering. You can create a utility function or use a library that handles these conversions
- Use dangerouslySetInnerHTML
function MyComponent() {
return (
<div>
Copy: ©, é: é
</div>
);
}
Or using dangerouslySetInnerHTML:
function MyComponent() {
return (
<div dangerouslySetInnerHTML={{__html: "Copy: ©, é: é"}}></div>
);
}
from react.
@valtlai Oh i didn't notice that!
from react.
This is working as intended, see facebook/jsx#136
from react.
Related Issues (20)
- [DevTools Bug]: Open in editor , Path not found error HOT 2
- Bug: Ref is set after componentDidMount (when mixing Class and Functional components) HOT 3
- [React 19] Disabling prerendering siblings of suspended components breaking common pattern HOT 16
- [Compiler Bug]: Constants or properties named `use*` trigger compiler errors re: hooks HOT 2
- [React 19] Using spread with binary conditional in JSX causes error in dev env for case of using legacy JSX transform HOT 3
- [DevTools Bug] Cannot add node "1" because a node with that id is already in the Store. HOT 1
- [React 19] When multiple components call `use` inside a `Suspense`, it crosses the boundary of `Suspense` and stops rendering of other `Suspense` as well HOT 2
- [Compiler]: Type inference information does not propagate past phi nodes HOT 1
- Bug: "Should not already be working" Error Provides No Information (Not Even the Name Indicates What's Wrong)
- [React 19] React-Dom bundle increase 200kb HOT 3
- Bug: Expected Static Flag Was Missing
- [React 19] useEffect does not re-fire on hot reload with React 19 and vite HOT 1
- Bug: Hundreds render of Suspense child with hydration error HOT 5
- Bug: Receiving `Error: Should have a queue. This is likely a bug in React. Please file an issue` on usage of `next-safe-action`'s `useAction` hook HOT 1
- [React 19] infinite loop when using React lazy & functional formAction together. HOT 4
- The const array variable value populated in a function does not reflect the updated values when called in another function in Firefox HOT 2
- Bug: DoS vulnerability in ws dependency
- [React 19] Inconsistent "cache" api with Async Operations in react-server HOT 2
- [Compiler Bug]: Increment expression in for-loop loses assignment operation HOT 4
- Bug: TypeError: Cannot read properties of null (reading 'useState')
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react.