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 135378 - & missed by the code completion for attribute values
Summary: & missed by the code completion for attribute values
Status: RESOLVED DUPLICATE of bug 137717
Alias: None
Product: xml
Classification: Unclassified
Component: Text-Edit (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Samaresh Panda
URL:
Keywords:
Depends on:
Blocks: 138486
  Show dependency tree
 
Reported: 2008-05-19 19:07 UTC by windli
Modified: 2008-06-28 00:02 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
a possible patch (642 bytes, patch)
2008-05-19 19:08 UTC, windli
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description windli 2008-05-19 19:07:03 UTC
Create a simple xml file like this,
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE XMLCatalog PUBLIC '-//DTD XMLCatalog//EN' 'null'>
<XMLCatalog>
    <Base HRef=""/>
</XMLCatalog>

Press & in the HRef attribute, code completion show a list like &amp;&lt; ...
Select one of them, press enter,the value will be put into the field, but & is missed. For example if I select amp then
I will get:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE XMLCatalog PUBLIC '-//DTD XMLCatalog//EN' 'null'>
<XMLCatalog>
    <Base HRef="amp;"/>
</XMLCatalog>

Excepted is:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE XMLCatalog PUBLIC '-//DTD XMLCatalog//EN' 'null'>
<XMLCatalog>
    <Base HRef="&amp;"/>
</XMLCatalog>
Comment 1 windli 2008-05-19 19:08:22 UTC
Created attachment 61577 [details]
a possible patch
Comment 2 Samaresh Panda 2008-05-27 16:27:51 UTC
Fixed: http://hg.netbeans.org/main/rev/1ee185318351.
Comment 3 windli 2008-05-29 05:23:47 UTC
Hi samaresh 
  I tried the last dev. Sames the patch is not a correct one. It only works for attributes. But in content, it will
cause a redundant &.

Regards
Wind
Comment 4 Samaresh Panda 2008-06-28 00:02:30 UTC
One fix for both this and issue 137717.

*** This issue has been marked as a duplicate of 137717 ***