Skip to content

Commit

Permalink
Disallow parent selector in selector_fns arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
glebm committed Dec 2, 2018
1 parent 598bade commit 9823b57
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/fn_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ namespace Sass {
str->quote_mark(0);
}
std::string exp_src = exp->to_string(ctx.c_options);
return Parser::parse_selector(exp_src.c_str(), ctx, traces, exp->pstate(), pstate.src);
return Parser::parse_selector(exp_src.c_str(), ctx, traces, exp->pstate(), pstate.src, /*allow_parent=*/false);
}

Compound_Selector_Obj get_arg_sel(const std::string& argname, Env& env, Signature sig, ParserState pstate, Backtraces traces, Context& ctx) {
Expand All @@ -141,7 +141,7 @@ namespace Sass {
str->quote_mark(0);
}
std::string exp_src = exp->to_string(ctx.c_options);
Selector_List_Obj sel_list = Parser::parse_selector(exp_src.c_str(), ctx, traces, exp->pstate(), pstate.src);
Selector_List_Obj sel_list = Parser::parse_selector(exp_src.c_str(), ctx, traces, exp->pstate(), pstate.src, /*allow_parent=*/false);
if (sel_list->length() == 0) return {};
Complex_Selector_Obj first = sel_list->first();
if (!first->tail()) return first->head();
Expand Down

0 comments on commit 9823b57

Please sign in to comment.