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

Unified Diff: third_party/WebKit/Source/platform/weborigin/KURL.cpp

Issue 2270373002: Remove stale comments for blink::decodeURLEscapeSequences() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: a Created 4 years, 4 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/platform/weborigin/KURL.cpp
diff --git a/third_party/WebKit/Source/platform/weborigin/KURL.cpp b/third_party/WebKit/Source/platform/weborigin/KURL.cpp
index b191958f75a3b25752a9ab0039d5bcb84832cfe9..8e676a88a3b033e890c7b9efb41d2e2310110fa0 100644
--- a/third_party/WebKit/Source/platform/weborigin/KURL.cpp
+++ b/third_party/WebKit/Source/platform/weborigin/KURL.cpp
@@ -655,27 +655,8 @@ String decodeURLEscapeSequences(const String& string)
return decodeURLEscapeSequences(string, UTF8Encoding());
}
-// In KURL.cpp's implementation, this is called by every component getter.
-// It will unescape every character, including '\0'. This is scary, and may
-// cause security holes. We never call this function for components, and
-// just return the ASCII versions instead.
-//
-// This function is also used to decode javascript: URLs and as a general
-// purpose unescaping function.
-//
-// FIXME These should be merged to the KURL.cpp implementation.
String decodeURLEscapeSequences(const String& string, const WTF::TextEncoding& encoding)
{
- // FIXME We can probably use KURL.cpp's version of this function
- // without modification. However, I'm concerned about
- // https://bugs.webkit.org/show_bug.cgi?id=20559 so am keeping this old
- // custom code for now. Using their version will also fix the bug that
- // we ignore the encoding.
- //
- // FIXME b/1350291: This does not get called very often. We just convert
- // first to 8-bit UTF-8, then unescape, then back to 16-bit. This kind of
- // sucks, and we don't use the encoding properly, which will make some
- // obscure anchor navigations fail.
StringUTF8Adaptor stringUTF8(string);
url::RawCanonOutputT<base::char16> unescaped;
url::DecodeURLEscapeSequences(stringUTF8.data(), stringUTF8.length(), &unescaped);
« no previous file with comments | « third_party/WebKit/Source/platform/weborigin/KURL.h ('k') | third_party/WebKit/Source/platform/weborigin/KURLTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698