Disallow invalid function names.

This commit is contained in:
Natalie Weizenbaum 2017-01-08 16:18:14 -08:00
parent 06609e4551
commit 8d7a8c7e12
2 changed files with 13 additions and 0 deletions

View File

@ -1,5 +1,7 @@
## 1.0.0-alpha.8
* Disallow invalid function names.
* Fix `@at-root` query parsing.
* Support special functions in `@-moz-document`.

View File

@ -559,6 +559,17 @@ abstract class StylesheetParser extends Parser {
scanner.string);
}
switch (unvendor(name)) {
case "calc":
case "element":
case "expression":
case "url":
scanner.error("Invalid function name.",
position: start.position,
length: scanner.position - start.position);
break;
}
whitespace();
var children = this.children(_functionAtRule);