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

Summary: & missed by the code completion for attribute values
Product: xml Reporter: windli <windli>
Component: Text-EditAssignee: Samaresh Panda <samaresh>
Status: RESOLVED DUPLICATE    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 138486    
Attachments: a possible patch

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 ***