diff --git a/src/scripting/ruby/hooks.c b/src/scripting/ruby/hooks.c index b4eb32eb0..9ac13d083 100644 --- a/src/scripting/ruby/hooks.c +++ b/src/scripting/ruby/hooks.c @@ -160,7 +160,7 @@ script_hook_pre_format_html(va_list ap, void *data) args[0] = rb_str_new2(url); /* FIXME: Use html_len */ - args[1] = rb_str_new(fragment->data, fragment->length); + args[1] = rb_str_new2(fragment->data); result = erb_protected_method_call("pre_format_html_hook", 2, args, &error); if (error) {