diff --git a/src/modules/Parser/html.c b/src/modules/Parser/html.c index e9989e87e2ea9fed6435b70b97c8dccad21bb49f..44074140a6d051eeec7c8f28651e2f325d91955e 100644 --- a/src/modules/Parser/html.c +++ b/src/modules/Parser/html.c @@ -21,8 +21,8 @@ extern struct program *parser_html_program; /* #define SCAN_DEBUG -*/ #define DEBUG +*/ #ifdef DEBUG #undef DEBUG @@ -1267,7 +1267,21 @@ static void do_callback(struct parser_html_storage *this, push_feed_range(start,cstart,end,cend); else ref_push_string(empty_string); - apply_svalue(callback_function,2); + + if (this->extra_args) + { + this->extra_args->refs++; + push_array_items(this->extra_args); + + DEBUG((stderr,"_-callback args=%d\n",2+this->extra_args->size)); + + apply_svalue(callback_function,2+this->extra_args->size); + } + else + { + DEBUG((stderr,"_-callback args=%d\n",2)); + apply_svalue(callback_function,2); + } } static newstate entity_callback(struct parser_html_storage *this,