This site is the archived OWASP Foundation Wiki and is no longer accepting Account Requests.
To view the new OWASP Foundation website, please visit https://owasp.org
CRV2 ContextEncHTMLEntity
From OWASP
HTML elements which contain user controlled data or data from untrusted sourced should be reviewed for contextual output encoding. In the case of HTML entities we need to help ensure HTML Entity Encoding is perfromed:
Example HTML Entity containing untrusted data:
HTML Body Context
UNTRUSTED DATA
OR
<body>...UNTRUSTED DATA </body>
OR
<div>UNTRUSTED DATA </div>
HTML Entity Encoding is required
& --> & < --> < > --> > " --> " ' --> '