I know these:
For HTML text : htmlentities() or htmlspecialchars()
When outputting plain visible text within HTML para/div tags.
For URL-encoded values : urlencode()
When sending data to a function in PHP that expects URL encoded values.
I dont know this:
<input value="DATA">
tags.Attribute values are HTML text. Use htmlspecialchars
.