[utilities COMMIT] /java-support/trunk/src/main/java/net/shibboleth/utilities/java/support/encoder/HTMLEncoder.java
noreply at shibboleth.net
noreply at shibboleth.net
Wed Apr 16 23:38:18 EDT 2014
Author: tzeller
Date: Wed Apr 16 23:38:17 2014
New Revision: 558
URL: http://svn.shibboleth.net/view/utilities?rev=558&view=rev
Log:
Minor javadoc and a missing annotation.
Modified:
java-support/trunk/src/main/java/net/shibboleth/utilities/java/support/encoder/HTMLEncoder.java
Modified: java-support/trunk/src/main/java/net/shibboleth/utilities/java/support/encoder/HTMLEncoder.java
URL: http://svn.shibboleth.net/view/utilities/java-support/trunk/src/main/java/net/shibboleth/utilities/java/support/encoder/HTMLEncoder.java?rev=558&r1=557&r2=558&view=diff
==============================================================================
--- java-support/trunk/src/main/java/net/shibboleth/utilities/java/support/encoder/HTMLEncoder.java (original)
+++ java-support/trunk/src/main/java/net/shibboleth/utilities/java/support/encoder/HTMLEncoder.java Wed Apr 16 23:38:17 2014
@@ -40,7 +40,8 @@
import javax.annotation.Nullable;
/**
- * An HTML encoder.
+ * An HTML encoder derived from the OWASP ESAPI project. The encoded output will be safe for an HTML interpreter as
+ * unsafe characters are translated into their safe equivalent.
*
* @see <a href="OSJ-69">https://issues.shibboleth.net/jira/browse/OSJ-69</a>
*
@@ -69,7 +70,7 @@
* Initialize an array to mark which characters are to be encoded. Store the hex string for that character to save
* time later. If the character shouldn't be encoded, then store null.
*/
- private static final String[] HEX = new String[256];
+ @Nonnull private static final String[] HEX = new String[256];
static {
for (char c = 0; c < 0xFF; c++) {
More information about the commits
mailing list