HTML: Should I encode greater than or not? ( > > )

Strictly speaking, to prevent HTML injection, you need only encode < as &lt;.

If user input is going to be put in an attribute, also encode " as &quot;.

If you’re doing things right and using properly quoted attributes, you don’t need to worry about >. However, if you’re not certain of this you should encode it just for peace of mind – it won’t do any harm.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)