Search code examples
browserrenderingentities

Why do some browsers allow "invalid" character entities?


As far as I can tell from the documentation, the semicolon is required as part of the syntax for entity reference. So a non-breaking space must be   not &nbsp. However, it looks like Safari is the only browser that DOESN'T render entities without a semicolon. Does anyone know why? Both Safari and Chrome use webkit, yet Chrome renders regardless of the semicolon.


Solution

  • It's the input part of the principle of Generous on Input, strict on output. Different browsers choose different measures of "generous".