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 209067 - URL value of properties in CSS files is parsed incorrectly if the value is not enclosed by single or double quotes
Summary: URL value of properties in CSS files is parsed incorrectly if the value is no...
Status: RESOLVED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: CSS Visual Tools (show other bugs)
Version: 7.1.1
Hardware: PC Windows 7
: P3 normal with 3 votes (vote)
Assignee: Marek Fukala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-01 18:26 UTC by Deldadam
Modified: 2012-10-05 10:58 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Deldadam 2012-03-01 18:26:06 UTC
Hi All,

Consider the following CSS 'background' property declaration:

div {
  background: red url(myImage.png);
}

The editor reports 'Unexpected value token url' for above declaration because the url value is not enclosed either by single (') or double (") quotes.

Quote from CSS 2.1 spec:
"The format of a URI value is 'url(' followed by optional white space followed by an OPTIONAL single quote (') or double quote (") character..."
(Ref.: http://www.w3.org/TR/CSS2/syndata.html#value-def-uri)

It is said: optional. Also the above example declaration is correct.

Note: NB 7.1 handled the above declaration properly. (Namely: this is a regression.)

Regards,

Peter
Comment 1 Marek Fukala 2012-04-11 14:21:51 UTC
already fixed
Comment 2 JumpFrog 2012-04-12 23:08:33 UTC
I still have this problem - Downloaded and installed Netbeans about an hour ago and am running 7.1.1.  There are no updates available.

OS: W7 Ultimate 64bit
File Type: .css

Following line generates 'unexpected value token url':

background: url(../images/body_repeat_x.jpg) top left repeat-x;

I am new to Netbeans, so perhaps I am missing an area where I am supposed to download a patch for this?

Thanks
Comment 3 Marek Fukala 2012-04-13 06:58:30 UTC
fixed in the Target milestone = 7.2. So you need  a dev build of 7.2 to verify. You can download one at netbeans.org
Comment 4 seankong 2012-06-29 21:09:22 UTC
(In reply to comment #3)
> fixed in the Target milestone = 7.2. So you need  a dev build of 7.2 to verify.
> You can download one at netbeans.org

I am still getting this error in 7.2 RC1. Following is my CSS line,

background: #134a8c url(#{resource["style:bkgd-container-main.gif"]}) no-repeat bottom;
Comment 5 st3vie 2012-07-17 07:15:58 UTC
I can confirm, that in v7.2 RC1, the issue is still there. I'm using Windows 7 (64 bit).
Comment 6 Deldadam 2012-07-28 15:55:12 UTC
The problem still exists in full release (7.2) too.
Comment 7 thegame 2012-08-07 09:48:44 UTC
I'm also seeing this bug on version 7.2 win7 64bit and it's quite annoying.
Comment 8 likethesky 2012-08-21 19:51:16 UTC
I'm just adding to the litany here:  Confirming that this still exists in the following build on Mac OS X Mountain Lion (10.8):

Product Version: NetBeans IDE 7.2 (Build 201207171143)
Java: 1.7.0_06; Java HotSpot(TM) 64-Bit Server VM 23.2-b09
System: Mac OS X version 10.8 running on x86_64; US-ASCII; en_US (nb)
User directory: /Users/brad/Library/Application Support/NetBeans/7.2
Cache directory: /Users/brad/Library/Caches/NetBeans/7.2
Comment 9 BlueRaja 2012-08-25 10:28:43 UTC
Just another confirmation that this still exists in the latest version, NetBeans IDE 7.2 (Build 201207171143).  I downloaded the PHP-version.
Comment 10 trulycool 2012-08-27 20:05:40 UTC
Confirming bug still exists on Vista 64 NetBeans IDE 7.2 (Build 201207171143)...
Comment 11 Marek Fukala 2012-10-05 10:58:11 UTC
all the examples listed in this issue work fine in 7.3 except:

div {
   
    background: #134a8c url(#{resource["style:bkgd-container-main.gif"]}) no-repeat
bottom;
    
}

which is not valid css code - there's some expression language inside the URL token, this is invalid case.