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 205056 - Validation HTML5 void Elements - inappropriate
Summary: Validation HTML5 void Elements - inappropriate
Status: RESOLVED WORKSFORME
Alias: None
Product: web
Classification: Unclassified
Component: HTML Editor (show other bugs)
Version: 7.0.1
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Assignee: Marek Fukala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-13 20:44 UTC by talofo
Modified: 2011-11-14 16:29 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
sample php file with html5 markup (321 bytes, text/php)
2011-11-14 16:27 UTC, talofo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description talofo 2011-11-13 20:44:18 UTC
I cannot be sure, but:

In HTML5 "Void elements" should not contain a end tag, but the final slash is optional and it would only benefit those who wish to validate their documents has XML.

So, <img src="/somepath" alt="sometext"> is correct. But Netbeans says it isn't.
The same goes for <br> and other void elements. 

Regards,
mem
Comment 1 Marek Fukala 2011-11-14 16:14:55 UTC
Works fine for me in 7.1. The html validator follows the html5 spec so naturally it allows such code.

Test file (test.html):

<!DOCTYPE html>
<html>
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" type="text/css" href="resources/css/jsfcrud.css"/>
    </head>
    <body>
        <img src="/somepath" alt="sometext">
        <br>
        <br>
    </body>
</html>

=> no warnings/errors

If you can still reproduce the issue, could you provide some additional information - what ide version, what kind of project, what file type etc. 

Ideally attach a sample file I can use to verify the behavior you describe.

Thank you in advance.
Comment 2 talofo 2011-11-14 16:27:30 UTC
Created attachment 113196 [details]
sample php file with html5 markup
Comment 3 talofo 2011-11-14 16:29:14 UTC
"If you can still reproduce the issue, could you provide some additional"
information - 

"what ide version," 
7.0.1

"what kind of project,"
php project

"what file type etc." 
.php

"Ideally attach a sample file I can use to verify the behavior you describe."
On the previous comment.


Regards,
M.