WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 21076
43128
Self Closing Tags Parsed with Attributes
https://bugs.webkit.org/show_bug.cgi?id=43128
Summary
Self Closing Tags Parsed with Attributes
stanaland
Reported
2010-07-28 10:48:52 PDT
Created
attachment 62847
[details]
Example HTML File I have found that when attributes do not have quotes, a self closing tag can cause a minor parse problem. For Example: <input type="button" type=button tabindex=1 value=Test/> <input name="title" type="text" id="title" maxLength=255 value="" tabindex=1/> The forward slash is counted as part of the last attribute. Quotes on the attribute or a space before the forward slash fixes this. I have attached an HTML file that shows this behavior. In the example, the button text shows the forward slash and the tabindexes like the above are skipped when tabbing through the fields. Note: I am not arguing whether the above HTML is valid, but it would help with compatibility with other browsers.
Attachments
Example HTML File
(1.45 KB, text/html)
2010-07-28 10:48 PDT
,
stanaland
no flags
Details
Updated Example HTML File
(1.45 KB, text/html)
2010-08-02 15:14 PDT
,
stanaland
no flags
Details
Updated Example HTML File (Corrected)
(1.31 KB, text/html)
2010-08-02 15:20 PDT
,
stanaland
no flags
Details
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Adam Barth
Comment 1
2010-08-02 14:04:34 PDT
Thanks for the report. Believe our behavior now matches Internet Explorer, Firefox, and the HTML5 specification. For example, I loaded you example file in Firefox 3.6, Firefox 4.0b, and IE8. In all these browsers the button at the bottom right reads "Test/". Am I misunderstanding your test case? Your report asks for better compatibility with other browsers, but my understanding is that we're achieving that with this change.
stanaland
Comment 2
2010-08-02 15:14:27 PDT
Created
attachment 63265
[details]
Updated Example HTML File Interesting. I noticed the behavior in regards to the tabindex attribute, where Chrome & Safari *are* behaving differently from IE and Firefox. But you are right that the button example displays the same on all the browsers I tested (my mistake...bad example). Try using the tab key to go through the inputs to see the issue that I am talking about. After further testing, it seems that all the browsers I tested, including Webkit browsers, generally ignore trailing symbols at the end of most numerical attributes (tabindex, size, etc). However, Webkit browsers seems to be the only browsers that do not tolerate a symbol at the end of the tabindex attribute. I have attached an updated example showing how size=3# is accepted by all tested browsers, but tabindex=1# is only ignored by Chrome & Safari.
stanaland
Comment 3
2010-08-02 15:20:22 PDT
Created
attachment 63267
[details]
Updated Example HTML File (Corrected) Ooops, here is the correct updated attachment.
Adam Barth
Comment 4
2010-08-02 15:56:53 PDT
Does the same issue occur if you use quotes around the attribute value? It sounds like we need to loosen up our parsing of tabindex (and possibly other numerical attributes) to tolerate trailing non-digits.
Adam Barth
Comment 5
2010-09-13 18:18:25 PDT
*** This bug has been marked as a duplicate of
bug 21076
***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug