Skip to content

Commit

Permalink
Allow unicode chars in unquoted urls
Browse files Browse the repository at this point in the history
Fixes #2120
  • Loading branch information
mgreter committed Jul 19, 2016
1 parent 2fde7e6 commit db1d56b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
7 changes: 4 additions & 3 deletions src/lexer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,12 @@ namespace Sass {
}

// check if char is within a reduced ascii range
// valid in a uri (copied from Ruby Sass)
// valid in a uri (and also unicode octets)
bool is_uri_character(const char& chr)
{
return (unsigned(chr) > 41 && unsigned(chr) < 127) ||
unsigned(chr) == ':' || unsigned(chr) == '/';
return unsigned(chr) > 41 ||
unsigned(chr) == ':' ||
unsigned(chr) == '/';
}

// check if char is within a reduced ascii range
Expand Down
4 changes: 0 additions & 4 deletions src/parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -316,10 +316,6 @@ namespace Sass {
else if (String* the_url = parse_url_function_argument()) {
*args << SASS_MEMORY_NEW(ctx.mem, Argument, the_url->pstate(), the_url);
}
else if (peek < skip_over_scopes < exactly < '(' >, exactly < ')' > > >(position)) {
Expression* the_url = parse_list(); // parse_interpolated_chunk(lexed);
*args << SASS_MEMORY_NEW(ctx.mem, Argument, the_url->pstate(), the_url);
}
else {
error("malformed URL", pstate);
}
Expand Down

0 comments on commit db1d56b

Please # to comment.