summaryrefslogtreecommitdiffstats
path: root/chrome/browser/importer
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/importer')
-rw-r--r--chrome/browser/importer/firefox2_importer.cc17
-rw-r--r--chrome/browser/importer/importer.cc5
2 files changed, 16 insertions, 6 deletions
diff --git a/chrome/browser/importer/firefox2_importer.cc b/chrome/browser/importer/firefox2_importer.cc
index 77fd49f..8dfddd2 100644
--- a/chrome/browser/importer/firefox2_importer.cc
+++ b/chrome/browser/importer/firefox2_importer.cc
@@ -501,11 +501,18 @@ bool Firefox2Importer::GetAttribute(const std::string& attribute_list,
// static
void Firefox2Importer::HTMLUnescape(std::wstring *text) {
- ReplaceSubstringsAfterOffset(text, 0, L"&lt;", L"<");
- ReplaceSubstringsAfterOffset(text, 0, L"&gt;", L">");
- ReplaceSubstringsAfterOffset(text, 0, L"&amp;", L"&");
- ReplaceSubstringsAfterOffset(text, 0, L"&quot;", L"\"");
- ReplaceSubstringsAfterOffset(text, 0, L"&#39;", L"\'");
+ string16 text16 = WideToUTF16Hack(*text);
+ ReplaceSubstringsAfterOffset(
+ &text16, 0, ASCIIToUTF16("&lt;"), ASCIIToUTF16("<"));
+ ReplaceSubstringsAfterOffset(
+ &text16, 0, ASCIIToUTF16("&gt;"), ASCIIToUTF16(">"));
+ ReplaceSubstringsAfterOffset(
+ &text16, 0, ASCIIToUTF16("&amp;"), ASCIIToUTF16("&"));
+ ReplaceSubstringsAfterOffset(
+ &text16, 0, ASCIIToUTF16("&quot;"), ASCIIToUTF16("\""));
+ ReplaceSubstringsAfterOffset(
+ &text16, 0, ASCIIToUTF16("&#39;"), ASCIIToUTF16("\'"));
+ text->assign(UTF16ToWideHack(text16));
}
// static
diff --git a/chrome/browser/importer/importer.cc b/chrome/browser/importer/importer.cc
index 9c98362..2d3f924 100644
--- a/chrome/browser/importer/importer.cc
+++ b/chrome/browser/importer/importer.cc
@@ -667,7 +667,10 @@ void ImporterHost::DetectFirefoxProfiles() {
std::wstring is_relative, path, profile_path;
if (root.GetString(current_profile + L".IsRelative", &is_relative) &&
root.GetString(current_profile + L".Path", &path)) {
- ReplaceSubstringsAfterOffset(&path, 0, L"/", L"\\");
+ string16 path16 = WideToUTF16Hack(path);
+ ReplaceSubstringsAfterOffset(
+ &path16, 0, ASCIIToUTF16("/"), ASCIIToUTF16("\\"));
+ path.assign(UTF16ToWideHack(path16));
#if defined(OS_WIN)
// IsRelative=1 means the folder path would be relative to the