- From: Kornel Lesinski <kornel@geekhood.net>
- Date: Sat, 19 Jul 2014 23:58:36 +0100
- To: www-style list <www-style@w3.org>
If the use case is to construct URLs, then I think it's wrong to frame it as problem of string concatenation. URLs are not just strings: they require proper encoding. String escaping is type- and context-dependent, and authors get it notoriously wrong. With naive string concatenation a case like this will likely generate an invalid URL: url("/picture?of=" + attr(title)); And it's not always URL-encoding, it may require punycode: url("//" + attr(hostname) + "/favicon.ico"); or it may be expected that there is no encoding applied at all: url("/images/foo.png" + var(--default-query-string)); -- regards, Kornel
Received on Saturday, 19 July 2014 22:59:09 UTC