NamedNodeMap not handling whitespace

RESOLVED INVALID

Status

()

Core
DOM: Core & HTML
RESOLVED INVALID
a year ago
a year ago

People

(Reporter: Scott, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

a year ago
User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0
Build ID: 20161208153507

Steps to reproduce:

Using DOM to parse a web page (https://esqa.moneris.com/mpg/). At the end is a DIV line with a value containing no quotes and some whitespace: <div style=height:100px;background:#445666;position:relative;vertical-align:baseline;margin-top:50px;text-align : right; !important;>




Actual results:

Using element.attributes NameNodeMap returns ":" "right;" and "!important;" as separate attributes versus part of the attribute value.

I believe CSS spec allows for whitespace here.


Expected results:

NameNodeMap should not return ":" "right;" and "!important;" as separate attributes
(Reporter)

Updated

a year ago
OS: Unspecified → Windows 8.1
Hardware: Unspecified → x86_64
(In reply to Scott from comment #0)
> I believe CSS spec allows for whitespace here.

CSS allows whitespace there, but HTML doesn't allow whitespace in attribute value without quotation.
you need to quote the value by double quotation (")
Status: UNCONFIRMED → RESOLVED
Last Resolved: a year ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.