This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 6203 - Escape of new line inside a string with backslash
Summary: Escape of new line inside a string with backslash
Status: RESOLVED INVALID
Alias: None
Product: CSSValidator
Classification: Unclassified
Component: CSS 2.1 (show other bugs)
Version: CSS Validator
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: qa-dev tracking
URL: http://jigsaw.w3.org/css-validator/va...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-02 21:22 UTC by Gérard Talbot
Modified: 2008-11-05 22:31 UTC (History)
0 users

See Also:


Attachments

Description Gérard Talbot 2008-11-02 21:22:29 UTC
Relevant code involved
----------------------
  <style type="text/css">
  #test
  {
  background-color: red;
  background-color: gre\
en;
  color: white;
  }
  </style>

(...)

  <p id="test">This line should be green.</p>



Testcase URL
------------
http://www.gtalbot.org/BrowserBugsSection/MSIE8Bugs/escape-newline-with-backslash-inside-string.html



CSS validation report:
---------------------
http://jigsaw.w3.org/css-validator/validator?uri=http://www.gtalbot.org/BrowserBugsSection/MSIE8Bugs/escape-newline-with-backslash-inside-string.html&warning=2&profile=css21&usermedium=all

which reports 

Line 44	 #test 
Value Error : background-color  
Lexical error at line 5, column 25. 
Encountered: "\n" (10), after : "\\"  gre en; 


Relevant CSS 2.1 spec involved
------------------------------
"
(...) inside a string, a backslash followed by a newline is ignored (i.e., the string is deemed not to contain either the backslash or the newline).
"
coming from CSS 2.1, section 4.1.3 Characters and case
http://www.w3.org/TR/CSS21/syndata.html#characters

Notes
-----
- I have searched for a duplicate and did not find any
- So far, only Gecko-based browsers (Firefox 3.0.3 rv: 1.9.0.3 build 2008092417, Netscape 7.2 rv:1.7.2 build 20040804, Seamonkey 2.0a2pre rv: 1.9.1b2pre build 20081031, K-meleon 1.51 rv:1.8.1.17 build 20080919) seem to comply/agree with my understanding of the CSS 2.1 spec involved.

Regards, Gérard
Comment 1 Gérard Talbot 2008-11-05 22:31:47 UTC
After a discussion in the W3C Emailing list for WWW Style <www-style@w3.org> with the subject line 
"[CSS2.1] Clarification on section 4.1.3 and the application of escaped newlines to identifiers."
started on November 5th 2008
http://lists.w3.org/Archives/Public/www-style/2008Nov/0035.html
it was established that my testcase was based on a misunderstanding of the issue involved: the backslash (\) character is to be used for visible character (inside a string; above code position 32). My mistake. So, 

resolving this bug as INVALID