This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 74299

Summary: Incorrect escaping in CDATA
Product: ide Reporter: Petr Jiricka <pjiricka>
Component: Schema2BeansAssignee: Erno Mononen <emononen>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P3    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Petr Jiricka 2006-04-03 13:43:19 UTC
Originally filed here:
https://glassfish.dev.java.net/issues/show_bug.cgi?id=514

This is what the bug report says:


It seems that s2b does not support setAttributeValue  opeartion if any of  two
symbols are inside of  attribute values - "<" and "]"
Above symbols are not converted to proper xml symbol codes (like &lt;), but
replaced by "?".
(meanwhile, get command does make the proper back conversions e.g "&lt;" ===> "<")

    The cause is in XMLUtil.java:
       /** Test if character can be in attr value
         */
        public static boolean isAttrContent(int i) {
            // return false for leading ACSII chars (except tab char)
            if (i<9) return false;
            if (i>9 && i<32) return false;
            // return false for <, ]
            if (i==60 || i==93) return false;
            // otherwise return true
            return true;
        }