diff options
author | dsh@google.com <dsh@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-03 01:21:09 +0000 |
---|---|---|
committer | dsh@google.com <dsh@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-03 01:21:09 +0000 |
commit | dbf476de0ef1cdcc11c5f2d689b8755809a857fb (patch) | |
tree | 5a68c5a8fb056c10441752dcd230e96180d1e775 /chrome/browser/bookmarks | |
parent | e1b01fc18365da2c58cc17981bf28fe71fd06b7e (diff) | |
download | chromium_src-dbf476de0ef1cdcc11c5f2d689b8755809a857fb.zip chromium_src-dbf476de0ef1cdcc11c5f2d689b8755809a857fb.tar.gz chromium_src-dbf476de0ef1cdcc11c5f2d689b8755809a857fb.tar.bz2 |
Port Replace(First)SubstringsAfterOffset to string16.
Review URL: http://codereview.chromium.org/28324
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10767 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/bookmarks')
-rw-r--r-- | chrome/browser/bookmarks/bookmark_html_writer.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/chrome/browser/bookmarks/bookmark_html_writer.cc b/chrome/browser/bookmarks/bookmark_html_writer.cc index 6b6c556..5ec7ca0 100644 --- a/chrome/browser/bookmarks/bookmark_html_writer.cc +++ b/chrome/browser/bookmarks/bookmark_html_writer.cc @@ -166,9 +166,11 @@ class Writer : public Task { case ATTRIBUTE_VALUE: // Convert " to \" if (text.find(L"\"") != std::wstring::npos) { - std::wstring replaced_string = text; - ReplaceSubstringsAfterOffset(&replaced_string, 0, L"\"", L"\\\""); - utf8_string = WideToUTF8(replaced_string); + string16 replaced_string = WideToUTF16Hack(text); + ReplaceSubstringsAfterOffset(&replaced_string, 0, + ASCIIToUTF16("\""), + ASCIIToUTF16("\\\"")); + utf8_string = UTF16ToUTF8(replaced_string); } else { utf8_string = WideToUTF8(text); } |