xmlgraphics-fop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerem...@apache.org
Subject svn commit: r965357 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFName.java
Date Mon, 19 Jul 2010 06:10:54 GMT
Author: jeremias
Date: Mon Jul 19 06:10:53 2010
New Revision: 965357

URL: http://svn.apache.org/viewvc?rev=965357&view=rev
Log:
Bugfix: "/" must be escaped in names.

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFName.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFName.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFName.java?rev=965357&r1=965356&r2=965357&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFName.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFName.java Mon Jul 19 06:10:53 2010
@@ -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();



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org


Mime
View raw message