We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 926f57e commit 28e4885Copy full SHA for 28e4885
src/main/java/org/owasp/validator/html/util/ErrorMessageUtil.java
@@ -23,6 +23,8 @@
23
*/
24
package org.owasp.validator.html.util;
25
26
+import java.nio.charset.Charset;
27
+import java.nio.charset.StandardCharsets;
28
import java.text.MessageFormat;
29
import java.util.ResourceBundle;
30
@@ -87,6 +89,10 @@ public final class ErrorMessageUtil {
87
89
private ErrorMessageUtil() {}
88
90
91
public static String getMessage(ResourceBundle messages, String msgKey, Object[] arguments) {
- return MessageFormat.format(messages.getString(msgKey), arguments);
92
+ return MessageFormat.format(
93
+ new String(
94
+ messages.getString(msgKey).getBytes(StandardCharsets.ISO_8859_1),
95
+ Charset.defaultCharset()),
96
+ arguments);
97
}
98
0 commit comments