]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Bugfix: "/" must be escaped in names.
authorJeremias Maerki <jeremias@apache.org>
Mon, 19 Jul 2010 06:10:53 +0000 (06:10 +0000)
committerJeremias Maerki <jeremias@apache.org>
Mon, 19 Jul 2010 06:10:53 +0000 (06:10 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@965357 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/pdf/PDFName.java

index 19db917c8c87b9c9f4c314b7c8eedb22bd1e8825..8628a90a75d1fd9a77f2f23f653369592d2809b3 100644 (file)
@@ -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();