Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Unified Diff: third_party/WebKit/Source/core/loader/FormSubmission.cpp

Issue 1845363003: String replaceWithLiteral should just use strlen, also rename to replace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another NUL fix. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/loader/FormSubmission.cpp
diff --git a/third_party/WebKit/Source/core/loader/FormSubmission.cpp b/third_party/WebKit/Source/core/loader/FormSubmission.cpp
index 2e994d7c55992b46f8ae1ec2b3390c94f84c4268..370d6910631c33351b1f8fbdffee1ce0e391a611 100644
--- a/third_party/WebKit/Source/core/loader/FormSubmission.cpp
+++ b/third_party/WebKit/Source/core/loader/FormSubmission.cpp
@@ -66,13 +66,13 @@ static void appendMailtoPostFormDataToURL(KURL& url, const EncodedFormData& data
if (equalIgnoringCase(encodingType, "text/plain")) {
// Convention seems to be to decode, and s/&/\r\n/. Also, spaces are encoded as %20.
- body = decodeURLEscapeSequences(body.replaceWithLiteral('&', "\r\n").replace('+', ' ') + "\r\n");
+ body = decodeURLEscapeSequences(body.replace('&', "\r\n").replace('+', ' ') + "\r\n");
}
Vector<char> bodyData;
bodyData.append("body=", 5);
FormDataEncoder::encodeStringAsFormData(bodyData, body.utf8());
- body = String(bodyData.data(), bodyData.size()).replaceWithLiteral('+', "%20");
+ body = String(bodyData.data(), bodyData.size()).replace('+', "%20");
StringBuilder query;
query.append(url.query());
« no previous file with comments | « third_party/WebKit/Source/core/layout/line/InlineTextBox.cpp ('k') | third_party/WebKit/Source/core/xml/XSLTProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698