Right paren in urls

A minor syntax question: What are the legal ways specify urls containing
right
parentheses? Right parentheses are "safe" characters in urls and don't
need
to encoded, but they are also the termination character in style sheet
url
references. 

My guess is that unencoded right parens would be legal in quoted urls,
and
illegal in unquoted urls. For example:

   Legal:    BODY { background: url("right)paren.gif") }
   Legal:    BODY { background: url('right)paren.gif') }
   Illegal:  BODY { background: url(right)paren.gif) }

However, this isn't clear to me from the style sheet specs. The lex
grammar
in Appendix B of 7/26/96 CSS-1 Working Draft doesn't handle any of these
cases.
This suggests all three forms may be illegal. The lex form from the
draft is:

   "url("[^\n)]+")"        {yylval.str = noquotes(yytext+3); return
URL;}

This terminates the url at the first right paren, in a quoted string or
not.

--Jon Degenhardt
  DocuMagix, Inc.

Received on Saturday, 7 September 1996 18:32:58 UTC