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 262411 - <input type="file" accept=".pdf" /> incorrectly gives error
Summary: <input type="file" accept=".pdf" /> incorrectly gives error
Alias: None
Product: web
Classification: Unclassified
Component: HTML Editor (show other bugs)
Version: 8.2
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Milutin Kristofic
Depends on:
Reported: 2016-06-13 13:32 UTC by terje7601
Modified: 2016-07-14 10:28 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description terje7601 2016-06-13 13:32:50 UTC
This gives the error below. However, this is valid HTML5 syntax:

Bad value ".pdf" for attribute "accept" on element "input": Expected "/" but the literal ended.
Syntax of MIME type list:

From line 10, column 4; to line 10, column 54
(Rule Category: Attributes)

Product Version: NetBeans IDE Dev (Build 201605200002)
Updates: Updates available
Java: 1.8.0_77; Java HotSpot(TM) 64-Bit Server VM 25.77-b03
Runtime: Java(TM) SE Runtime Environment 1.8.0_77-b03
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Comment 1 Milutin Kristofic 2016-07-13 13:44:21 UTC
Hi, shouldn't it be like this:
<input type="file" accept="application/pdf" /> ?
Comment 2 terje7601 2016-07-13 14:42:58 UTC
Yes, that's also valid, but ".pdf" is equally valid. Quoting from the URL in the first comment:

If specified, the attribute must consist of a set of comma-separated tokens, each of which must be an ASCII case-insensitive match for one of the following:

The string audio/*
    Indicates that sound files are accepted.
The string video/*
    Indicates that video files are accepted.
The string image/*
    Indicates that image files are accepted.
A valid MIME type with no parameters
    Indicates that files of the specified type are accepted.
A string whose first character is a "." (U+002E) character
    Indicates that files with the specified file extension are accepted.
Comment 3 Milutin Kristofic 2016-07-14 10:28:56 UTC
Ok, I tested this on which we are using for validating html in Netbeans. I will find out why it is not accepting in Netbeans.