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 270575 - Invalid PHP CSS error
Summary: Invalid PHP CSS error
Status: NEW
Alias: None
Product: web
Classification: Unclassified
Component: CSS Editor (show other bugs)
Version: 8.2
Hardware: PC Linux
: P2 normal (vote)
Assignee: Milutin Kristofic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-05 18:21 UTC by rachmann
Modified: 2017-05-10 12:25 UTC (History)
0 users

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 rachmann 2017-05-05 18:21:48 UTC
An escaped quote character is interpreted as end of string, causing mis-matched strings and comment end (and other bogus error messages that fall out).

Example in a css file: 
    (
     line numbers added at beginning of line, but not a part of file contents!
     -so the first 4 characters are not content [num-num-num-space]
    ):

001 /**************************************/
002 .comment-in-quotes-with-escaped:before {
003  content: '/* \" \' */';
004 }
005 .this_rule_must_stay {
006  color: #F00;
007  background-color: #FFF;
008 }
009 .comment-in-quotes-with-escaped:after {
010   content: "*/ \" \ '";
011 }
012 /************************************/
013 /*
014 "This has to go"
015 'This has to go'
016 */

For above, on line 3, the second quote (') is interpreted as end of string, rather than an excaped quote.
After that, the editor then thinks the asterix is an unexpected character, and the last quote on line 3 comments out everything until the last quote on line 15. Line 16 is also seen as an error.

The escaped quote must be allowed, or the CSS would fail on the site.
Comment 1 Tomas Mysik 2017-05-09 08:17:43 UTC
If I understand it correctly, it is issue in CSS support (and not PHP support). Please evaluate, thanks.

Thanks for reporting.
Comment 2 rachmann 2017-05-10 12:25:02 UTC
Well, it was based on the use of the PHP editor, but yes, it's CSS related. Not sure how you will proceed?