What are the characters that are required and suffice when escaping user-generated content before output? (in other words: what are the characters web developers should escape when outputting text that previously came from an untrusted, anonymous source?)
What are the characters that are required and suffice when escaping user-generated content before
Share
When echoing to a page, you should encode
From PHP’s
htmlspecialchars()docs.Note that the context also matters.
You’ll also need to take the character set into account.