mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-23 14:40:00 +00:00
Fix HtmlUtils unescape for supplementary chars
See gh-35477 Signed-off-by: potato <65760583+juntae6942@users.noreply.github.com>
This commit is contained in:
+4
-1
@@ -124,7 +124,10 @@ class HtmlCharacterEntityDecoder {
|
||||
int value = (!isHexNumberedReference ?
|
||||
Integer.parseInt(getReferenceSubstring(2)) :
|
||||
Integer.parseInt(getReferenceSubstring(3), 16));
|
||||
this.decodedMessage.append((char) value);
|
||||
if (value > Character.MAX_CODE_POINT) {
|
||||
return false;
|
||||
}
|
||||
this.decodedMessage.appendCodePoint(value);
|
||||
return true;
|
||||
}
|
||||
catch (NumberFormatException ex) {
|
||||
|
||||
Reference in New Issue
Block a user