diff options
author | Danesh Dadachanji <[email protected]> | 2012-06-14 11:11:01 -0400 |
---|---|---|
committer | Danesh Dadachanji <[email protected]> | 2012-06-14 11:11:01 -0400 |
commit | 51b3c90f20ed3c29866cd40ce057365a4ac17954 (patch) | |
tree | 09febcb0f1d46f852a4e876d34328082a45a9eaa /plugin | |
parent | b747688aeb1e1e9b1450e188fc0f48a7807bfe41 (diff) |
Fixed PR855: AppletStub getDocumentBase() doesn't return full URL
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/icedteanp/IcedTeaNPPlugin.cc | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/plugin/icedteanp/IcedTeaNPPlugin.cc b/plugin/icedteanp/IcedTeaNPPlugin.cc index d132780..f3d30a4 100644 --- a/plugin/icedteanp/IcedTeaNPPlugin.cc +++ b/plugin/icedteanp/IcedTeaNPPlugin.cc @@ -1094,24 +1094,11 @@ plugin_get_documentbase (NPP instance) href_id, &href); std::string href_str = IcedTeaPluginUtilities::NPVariantAsString(href); - - // Strip everything after the last "/" - gchar** parts = g_strsplit (href_str.c_str(), "/", -1); - guint parts_sz = g_strv_length (parts); - - std::string location_str; - for (int i=0; i < parts_sz - 1; i++) - { - location_str += parts[i]; - location_str += "/"; - } - - documentbase_copy = g_strdup (location_str.c_str()); + documentbase_copy = g_strdup (href_str.c_str()); // Release references. browser_functions.releasevariantvalue(&href); browser_functions.releasevariantvalue(&location); - g_strfreev(parts); cleanup_done: PLUGIN_DEBUG ("plugin_get_documentbase return\n"); PLUGIN_DEBUG("plugin_get_documentbase returning: %s\n", documentbase_copy); |