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 - Incorrect escaping in CDATA
Summary: Incorrect escaping in CDATA
Status: RESOLVED FIXED
Alias: None
Product: ide
Classification: Unclassified
Component: Schema2Beans (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Erno Mononen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-03 13:43 UTC by Petr Jiricka
Modified: 2006-04-06 12:16 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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;
        }