pan3793 commented on code in PR #4888:
URL: https://github.com/apache/hive/pull/4888#discussion_r1401441199


##########
service/src/java/org/apache/hive/service/ServiceUtils.java:
##########
@@ -73,4 +73,40 @@ public static boolean canProvideProgressLog(HiveConf 
hiveConf) {
         .getBoolVar(HiveConf.ConfVars.HIVE_SERVER2_INPLACE_PROGRESS);
   }
 
-}
\ No newline at end of file
+  private static final int LEN = 0xA1;
+  private static final char[][] TEXT = new char[LEN][];
+
+  /**
+   * Encodes a string to HTML-safe text. The following characters are replaced:
+   * <ul>
+   * <li><code>&amp;</code> with <code>&amp;amp;</code></li>
+   * <li><code>&lt;</code> with <code>&amp;lt;</code></li>
+   * <li><code>&gt;</code> with <code>&amp;gt;</code></li>
+   * <li><code>\u00A0</code> with <code>&nbsp;</code></li>
+   * </ul>
+   */
+  public static String text(final CharSequence text) {

Review Comment:
   I just found it could be replaced with 
`org.apache.commons.lang3.StringEscapeUtils#escapeHtml4`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to