Re: Treatment of unterminated string literal in CSS parser

So in the example from 4.2:
  @media screen {
    p:before { content: 'Hello

Should the declaration be dropped?

-Eli

--- Ian Hickson <ian@hixie.ch> wrote:

> 
> On Thu, 23 Aug 2007, Eli Friedman wrote:
> > 
> > According to the example in the latest draft of CSS2.1,
> unterminated 
> > string literals appear to be allowed (a "parsing error", but still 
> > parsed as a string.)  Is this correct, and if it is, does section
> 4.1.1 
> > need to be updated to reflect that?
> 
> They are not allowed. They actually cause the entire declaration to
> be 
> dropped. It's possible 4.1.1 needs to have a new token added for
> "bogus 
> string" or some such, but my understanding is that 4.1.1 describes
> the 
> valid syntax, not the syntax from the parser's point of view.
> 
> -- 
> Ian Hickson               U+1047E                )\._.,--....,'``.   
> fL
> http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._
> ,.
> Things that are impossible just take longer.  
> `._.-(,_..'--(,_..'`-.;.'
> 
> 



       
____________________________________________________________________________________
Yahoo! oneSearch: Finally, mobile search 
that gives answers, not web links. 
http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC

Received on Friday, 24 August 2007 03:57:00 UTC