Skip to content

Commit f5acf46

Browse files
Fix support for URLs without quotes
1 parent e6e8079 commit f5acf46

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tokenizer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ function tokenize(str, options) {
334334
else if(code == 0x27) switchto('url-single-quote');
335335
else if(code == 0x29) emit(new URLToken) && switchto('data');
336336
else if(whitespace(code)) donothing();
337-
else switchto('url-unquote') && reconsume();
337+
else switchto('url-unquoted') && reconsume();
338338
break;
339339

340340
case "url-double-quote":
@@ -379,7 +379,7 @@ function tokenize(str, options) {
379379
if(badescape(next())) parseerror() && switchto('bad-url');
380380
else currtoken.append(consumeEscape());
381381
}
382-
else currtoken.append(consumeEscape());
382+
else { reconsume(); currtoken.append(consumeEscape()); }
383383
break;
384384

385385
case "bad-url":

0 commit comments

Comments
 (0)