OWASP/owasp-java-encoder

API documentation has incorrect usage for forHtmlAttribute

thariyarox opened this issue · 2 comments

n the API documentation, forHtmlAttribute method's example usage is listed as following.
<%=Encode.forHtml(unsafeData)%>

It should be corrected as following.
<%=Encode.forHtmlAttribute(unsafeData)%>

I have corrected it and sent the PR [2]. Please review and merge.

[1] https://owasp.github.io/owasp-java-encoder/encoder/apidocs/org/owasp/encoder/Encode.html#forHtmlAttribute-java.lang.String-
[2] #23

Released and is live with version 1.2.2!