Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LibWeb: Escape HTML text fragments with multi-byte code point awareness
The UTF-8 encoding of U+00A0 (NBSP) is the bytes 0xc2 0xa0. By looping over the string to escape byte-by-byte, we replace the second byte with " ", but leave the first byte in the resulting text. This creates an invalid UTF-8 string, with a lone leading byte.
- Loading branch information