1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-17 23:55:32 +00:00

[smjs] Assume url is utf-8 encoded.

Before failed for goto-url-hook and idn domains.
This commit is contained in:
Witold Filipczyk 2023-01-02 17:34:33 +01:00
parent 8cb69b3832
commit db09b70a0d

View File

@ -36,7 +36,7 @@ script_hook_url(va_list ap, void *data)
JS::Realm *prev = JS::EnterRealm(smjs_ctx, smjs_elinks_object);
smjs_ses = ses;
args[2].setString(JS_NewStringCopyZ(smjs_ctx, *url));
args[2].setString(utf8_to_jsstring(smjs_ctx, *url, -1));
if (true == smjs_invoke_elinks_object_method((const char *)data, 1, args, &r_rval)) {
if (r_rval.isBoolean()) {