I want to use an HTML Entity Encoder for my HTML <div>${data}</div>
I was using ESAPI library ESAPI.encoder().encodeForHTML
But I am not sure if it is correct, because for instance, the result of encoding test/a/2 using ESAPI.encoder().encodeForHTML
is test/a/2
(that's what I see in my JSP using :
<div><esapi:encodeForHTML>${deviceKey}</esapi:encodeForHTML></div>
but on this site http://www.web2generators.com/html-based-tools/online-html-entities-encoder-and-decoder the result is test/a/2 (?!) Why ?