Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Cyber Security
  3. Question
Cyber Security

Why does HTML forward Slash?

Asked by Oliver Watson Oct 17, 2022 1.7K views 1 answer
Share

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>


Your answer

1 Answer