summaryrefslogtreecommitdiffstats
path: root/chrome/browser/bookmarks
diff options
context:
space:
mode:
authordsh@google.com <dsh@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-03 01:21:09 +0000
committerdsh@google.com <dsh@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-03 01:21:09 +0000
commitdbf476de0ef1cdcc11c5f2d689b8755809a857fb (patch)
tree5a68c5a8fb056c10441752dcd230e96180d1e775 /chrome/browser/bookmarks
parente1b01fc18365da2c58cc17981bf28fe71fd06b7e (diff)
downloadchromium_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.cc8
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);
}