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 162492

Summary: False "Unmatched tag" warning
Product: web Reporter: infozone <infozone>
Component: HTML EditorAssignee: Marek Fukala <mfukala>
Status: RESOLVED DUPLICATE    
Severity: blocker CC: tslota
Priority: P3    
Version: 6.x   
Hardware: PC   
OS: Windows Vista   
Issue Type: DEFECT Exception Reporter:
Attachments: IDE screenshot

Description infozone 2009-04-13 07:49:53 UTC
Type in code like this:

<select name='cont_type_code' class='button<?php echo $errors['cont_type_code']; ?>'>
	<option value='-' <?php echo empty($_POST['cont_type_code']) ? "selected='selected'" : ""; ?>></option>
	<option value='DC' <?php echo $_POST['cont_type_code'] == 'DC' ? "selected='selected'" : ""; ?>>DC</option>
	<option value='HC' <?php echo $_POST['cont_type_code'] == 'HC' ? "selected='selected'" : ""; ?>>HC</option>
	<option value='PW' <?php echo $_POST['cont_type_code'] == 'PW' ? "selected='selected'" : ""; ?>>PW</option>
	<option value='TC' <?php echo $_POST['cont_type_code'] == 'TC' ? "selected='selected'" : ""; ?>>TC</option>
	<option value='OT' <?php echo $_POST['cont_type_code'] == 'OT' ? "selected='selected'" : ""; ?>>OT</option>
	<option value='CS' <?php echo $_POST['cont_type_code'] == 'CS' ? "selected='selected'" : ""; ?>>CS</option>
	<option value='FT' <?php echo $_POST['cont_type_code'] == 'FT' ? "selected='selected'" : ""; ?>>FT</option>
</select>

Every odd <option> tag gets underlined as unmatched.
Comment 1 infozone 2009-04-13 07:54:04 UTC
Created attachment 79960 [details]
IDE screenshot
Comment 2 Marek Fukala 2009-04-14 13:04:03 UTC
The problem is caused by the templating language used inside the tags. Html parser actually doesn't properly recover
from such code.

Minimum usecase to reproduce (in a JSP file):

<select>
  <option <% %> ></option>
</select>
Comment 3 Marek Fukala 2009-04-17 10:48:03 UTC
*** Issue 160450 has been marked as a duplicate of this issue. ***
Comment 4 Marek Fukala 2009-04-21 11:06:25 UTC

*** This issue has been marked as a duplicate of 149968 ***
Comment 5 Marek Fukala 2009-06-18 13:17:00 UTC
the usecase works well after fixing 149968