diff options
-rw-r--r-- | src/java/org/apache/fop/pdf/PDFName.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/java/org/apache/fop/pdf/PDFName.java b/src/java/org/apache/fop/pdf/PDFName.java index 19db917c8..8628a90a7 100644 --- a/src/java/org/apache/fop/pdf/PDFName.java +++ b/src/java/org/apache/fop/pdf/PDFName.java @@ -54,11 +54,11 @@ public class PDFName extends PDFObject { } for (int i = 0, c = name.length(); i < c; i++) { char ch = name.charAt(i); - if (ch >= 33 && ch <= 126) { - sb.append(ch); - } else { + if (ch < 33 || ch > 126 || ch == 0x2F) { sb.append('#'); toHex(ch, sb); + } else { + sb.append(ch); } } return sb.toString(); |