diff options
author | Jeremias Maerki <jeremias@apache.org> | 2010-07-19 06:10:53 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2010-07-19 06:10:53 +0000 |
commit | 5c356af288f445eab2c43406f26517cacf2a6368 (patch) | |
tree | 8f50ef43273076ffc2e5891a0214f55aa3e9e665 | |
parent | 8b6a9f470121987cd2a97d435e26fcddaed3631b (diff) | |
download | xmlgraphics-fop-5c356af288f445eab2c43406f26517cacf2a6368.tar.gz xmlgraphics-fop-5c356af288f445eab2c43406f26517cacf2a6368.zip |
Bugfix: "/" must be escaped in names.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@965357 13f79535-47bb-0310-9956-ffa450edef68
-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(); |