# no-unescaped-entities

Rule `react/no-unescaped-entities`. Disallow unescaped HTML entities from appearing in markup

- Source: react
- Technologies: React
- Kind: suspicious
- Needs type information: no
- Autofix: yes, in at least one linter
- Reach: 131.4M weekly downloads of presets that enable it
- Trend: +37.9% last quarter
- Rank: #125 by reach, #1039 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `react/no-unescaped-entities` | yes | suggestion | package `eslint-plugin-react` | [docs](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unescaped-entities.md) |
| Oxlint | `react/no-unescaped-entities` | no | safe | plugin `react`, category pedantic | [docs](https://oxc.rs/docs/guide/usage/linter/rules/react/no-unescaped-entities.html) |

## Code examples

### Incorrect: the rule reports this

```jsx
<div> > </div>
```

### Correct: the rule accepts this

```jsx
<div> &gt; </div>
```

```jsx
<div> {'>'} </div>
```

Examples from the ESLint documentation.

## Enable it

### ESLint: `eslint.config.js`

```js
import react from "eslint-plugin-react";

export default [
  {
    plugins: { react },
    rules: {
      "react/no-unescaped-entities": "error",
    },
  },
];
```

### Oxlint: `.oxlintrc.json`

```json
{
  "plugins": [
    "react"
  ],
  "rules": {
    "react/no-unescaped-entities": "error"
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [React recommended](https://lintradar.dev/presets/react-recommended.md) | ESLint | `eslint-plugin-react` | 21 | 81.1M | +34.1% |
| [Next.js Core Web Vitals](https://lintradar.dev/presets/next-core-web-vitals.md) | ESLint | `eslint-config-next` | 62 | 46.8M | +48.8% |
| [Airbnb](https://lintradar.dev/presets/airbnb.md) | ESLint | `eslint-config-airbnb` | 346 | 3.4M | +2.3% |
| [Alloy](https://lintradar.dev/presets/alloy.md) | ESLint | `eslint-config-alloy` | 166 | 31.4K | +32.4% |

## Related rules

- [react/no-find-dom-node](https://lintradar.dev/rules/react/no-find-dom-node.md): Disallow usage of findDOMNode
- [react/no-deprecated](https://lintradar.dev/rules/react/no-deprecated.md): Disallow usage of deprecated methods
- [react/no-direct-mutation-state](https://lintradar.dev/rules/react/no-direct-mutation-state.md): Disallow direct mutation of this.state
- [react/jsx-uses-vars](https://lintradar.dev/rules/react/jsx-uses-vars.md): Disallow variables used in JSX to be incorrectly marked as unused
- [react/jsx-uses-react](https://lintradar.dev/rules/react/jsx-uses-react.md): Disallow React to be incorrectly marked as unused
- [react/require-render-return](https://lintradar.dev/rules/react/require-render-return.md): Enforce ES5 or ES6 class for returning value in render function

---

Web page: https://lintradar.dev/rules/react/no-unescaped-entities. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
