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

Unified Diff: third_party/WebKit/Source/core/xml/XSLTProcessor.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/xml/XSLTProcessor.cpp
diff --git a/third_party/WebKit/Source/core/xml/XSLTProcessor.cpp b/third_party/WebKit/Source/core/xml/XSLTProcessor.cpp
index 774add4619cc1c3f6d18cae2ff0d35e21ceb2165..6fd204ec1e065e441bcd18cd25c255801724f1a9 100644
--- a/third_party/WebKit/Source/core/xml/XSLTProcessor.cpp
+++ b/third_party/WebKit/Source/core/xml/XSLTProcessor.cpp
@@ -40,8 +40,8 @@ namespace blink {
static inline void transformTextStringToXHTMLDocumentString(String& text)
{
// Modify the output so that it is a well-formed XHTML document with a <pre> tag enclosing the text.
- text.replaceWithLiteral('&', "&amp;");
- text.replaceWithLiteral('<', "&lt;");
+ text.replace('&', "&amp;");
+ text.replace('<', "&lt;");
text = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n"
"<html xmlns=\"http://www.w3.org/1999/xhtml\">\n"
« no previous file with comments | « third_party/WebKit/Source/core/loader/FormSubmission.cpp ('k') | third_party/WebKit/Source/platform/text/LocaleWinTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698