About this question
In OWASP recommendations regarding escaping untrusted input for HTML element content, they list the following:
& --> &
< --> <
> --> >
" --> "
' --> ' ' not recommended because it's not in the HTML spec (See: section 24.4.1) ' is in the XML and XHTML specs.
/ --> / forward slash is included as it helps end an HTML entity
What is the purpose of including / in there? Indeed, / is part of the ending entity, but since we're already escaping < and>