Skip to content

Commit

Permalink
Remove disallowed characters 0xfffe and 0xffff when cleaning XML
Browse files Browse the repository at this point in the history
Relates to openpreserve#877
  • Loading branch information
karenhanson committed Aug 16, 2023
1 parent d745990 commit a3f3c23
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions jhove-core/src/main/java/edu/harvard/hul/ois/jhove/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public static String encodeContent(String content) {
if ((0x00 <= ch && ch <= 0x08) ||
(0x0b <= ch && ch <= 0x0c) ||
(0x0e <= ch && ch <= 0x1f) ||
(0xfffe <= ch && ch <= 0xffff) ||
0x7f == ch
) {
continue;
Expand Down Expand Up @@ -73,6 +74,7 @@ public static String encodeValue(String value) {
if ((0x00 <= ch && ch <= 0x08) ||
(0x0b <= ch && ch <= 0x0c) ||
(0x0e <= ch && ch <= 0x1f) ||
(0xfffe <= ch && ch <= 0xffff) ||
0x7f == ch
) {
continue;
Expand Down

0 comments on commit a3f3c23

Please sign in to comment.