diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-28 23:31:05 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-28 23:31:05 +0000 |
commit | 38e42e42981fc44ad788fef847e96bb3e3d536fa (patch) | |
tree | 0ab741d9aaf98889b4ec8940c054184907cbdf59 /webkit/glue/plugins/plugin_lib_linux.cc | |
parent | ab6f2b24e973aa04967fb13c93e6978f039c0125 (diff) | |
download | chromium_src-38e42e42981fc44ad788fef847e96bb3e3d536fa.zip chromium_src-38e42e42981fc44ad788fef847e96bb3e3d536fa.tar.gz chromium_src-38e42e42981fc44ad788fef847e96bb3e3d536fa.tar.bz2 |
linux plugins: assume UTF-8 for plugin name/description
Saw this on my Jaunty machine; plugin name included a copyright
symbol.
Review URL: http://codereview.chromium.org/159546
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21921 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/plugins/plugin_lib_linux.cc')
-rw-r--r-- | webkit/glue/plugins/plugin_lib_linux.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/webkit/glue/plugins/plugin_lib_linux.cc b/webkit/glue/plugins/plugin_lib_linux.cc index a390918..e27c999 100644 --- a/webkit/glue/plugins/plugin_lib_linux.cc +++ b/webkit/glue/plugins/plugin_lib_linux.cc @@ -45,6 +45,9 @@ bool PluginLib::ReadWebPluginInfo(const FilePath& filename, std::vector<std::string> descriptions; SplitString(mime_description, ';', &descriptions); for (size_t i = 0; i < descriptions.size(); ++i) { + if (descriptions[i].empty()) + continue; // Don't warn if they have trailing semis. + std::vector<std::string> fields; SplitString(descriptions[i], ':', &fields); if (fields.size() != 3) { @@ -70,12 +73,12 @@ bool PluginLib::ReadWebPluginInfo(const FilePath& filename, const char* name = NULL; NP_GetValue(NULL, nsPluginVariable_NameString, &name); if (name) - info->name = ASCIIToWide(name); + info->name = UTF8ToWide(name); const char* description = NULL; NP_GetValue(NULL, nsPluginVariable_DescriptionString, &description); if (description) - info->desc = ASCIIToWide(description); + info->desc = UTF8ToWide(description); } return true; |