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 203282 - Tags with empty content are not paired
Summary: Tags with empty content are not paired
Status: RESOLVED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: HTML Editor (show other bugs)
Version: 7.1
Hardware: PC Mac OS X
: P3 normal (vote)
Assignee: Marek Fukala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-07 08:47 UTC by Marek Fukala
Modified: 2011-10-10 12:30 UTC (History)
1 user (show)

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 Marek Fukala 2011-10-07 08:47:51 UTC
1) create an html file
2) put following code into the body:

<form>
   <input  type="text" name="my"></input>
</form>

3) set caret to the input tag
=> the tag is marked as unmatched

This is a problem in html5 parse tree - see Html5ParserTest.testTagsWithEmptyContent() unit test

... the nodes are not properly marked as pair
Comment 1 Marek Fukala 2011-10-07 08:53:20 UTC
just to make it clear - "empty content" means "empty content model"
Comment 2 Marek Fukala 2011-10-07 10:20:29 UTC
fixed in web-main#4662c27be493
Comment 3 Marek Fukala 2011-10-07 14:22:43 UTC
changeset:   203753:7394bbff2456
summary:     #203282 (reverting the previous fix and fixing it in different way) - Tags with empty content are not paired

I've changed the matcher so it marks the open tag with empty content as "self-matched" (just the area of the open tag becomes yellow) and the erroneous close tag as unmatched (red). 

There should be an error on your closing input tag saying the tag cannot have end tag since its empty. You won't get such warning in non-pure x/html files though!
Comment 4 Quality Engineering 2011-10-10 12:30:06 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/7ad5dac5bbe5
User: Marek Fukala <mfukala@netbeans.org>
Log: #203282 (adding test) - Tags with empty content are not paired