# The string following “&” was interpreted as a character reference. (“&” probably should have been escaped as “&amp;”.)

> Canonical HTML version: https://rocketvalidator.com/html-validation/the-string-following-was-interpreted-as-a-character-reference-probably-should-have-been-escaped-as-amp
> Attribution: Rocket Validator (https://rocketvalidator.com)
> License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

When the characters right after an unescaped `&` spell a known entity name, the parser reads them as a character reference instead of literal text.

HTML treats `&` as the start of a character reference such as `&amp;`, `&copy;`, or `&reg;`. Many of these references are also recognised without their trailing semicolon, so a bare `&` followed by a name like `reg`, `copy`, or `para` gets converted to `®`, `©`, or `¶`. The validator reports this because the result is almost never what the author intended.

This usually bites in URL query strings, where parameter names happen to match entity names. In `?id=1&reg=eu`, the `&reg` turns into `®`, so the link points somewhere different from what the source shows. Escape every literal `&` as `&amp;` to keep the text intact.

## HTML examples

### Invalid

```html
<!-- &reg becomes ® and &para becomes ¶ -->
<a href="/news?id=10&reg=europe&para=3">Read the report</a>
```

### Valid

```html
<!-- The & characters are kept literal -->
<a href="/news?id=10&amp;reg=europe&amp;para=3">Read the report</a>
```

Browsers convert `&amp;` back to a single `&` before requesting the URL, so the link works exactly as written while the markup stays valid.
