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

Unified Diff: url/url_canon.h

Issue 2895953002: Update dangling markup mitigations. (Closed)
Patch Set: Test. Created 3 years, 7 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: url/url_canon.h
diff --git a/url/url_canon.h b/url/url_canon.h
index d093f359fe18f244184b1163311b6fa8b4ac2e97..887150b0591791b250610321932f249e4d14929b 100644
--- a/url/url_canon.h
+++ b/url/url_canon.h
@@ -231,14 +231,21 @@ class URL_EXPORT CharsetConverter {
//
// Therefore, callers should not use the buffer, since it may actually be empty,
// use the computed pointer and |*output_len| instead.
-URL_EXPORT const char* RemoveURLWhitespace(const char* input, int input_len,
+//
+// If |input| contained both removable whitespace and a raw `<` character,
+// |potentially_dangling_markup| will be set to `true`. Otherwise, it will be
+// left untouched.
+URL_EXPORT const char* RemoveURLWhitespace(const char* input,
+ int input_len,
CanonOutputT<char>* buffer,
- int* output_len);
+ int* output_len,
+ bool* potentially_dangling_markup);
URL_EXPORT const base::char16* RemoveURLWhitespace(
const base::char16* input,
int input_len,
CanonOutputT<base::char16>* buffer,
- int* output_len);
+ int* output_len,
+ bool* potentially_dangling_markup);
// IDN ------------------------------------------------------------------------

Powered by Google App Engine
This is Rietveld 408576698