Index: third_party/WebKit/Source/core/html/parser/XSSAuditor.cpp |
diff --git a/third_party/WebKit/Source/core/html/parser/XSSAuditor.cpp b/third_party/WebKit/Source/core/html/parser/XSSAuditor.cpp |
index aabb158e0afc3729bf6b90e8bd1326735725c539..f2fc50cae37335cc5f0f2c18bb26a04248129561 100644 |
--- a/third_party/WebKit/Source/core/html/parser/XSSAuditor.cpp |
+++ b/third_party/WebKit/Source/core/html/parser/XSSAuditor.cpp |
@@ -73,8 +73,10 @@ static bool isNonCanonicalCharacter(UChar c) |
// We also remove the questionmark character, since some severs replace invalid high-bytes with a questionmark. We |
// are already stripping the high-bytes so we also strip the questionmark to match. |
// |
+ // We also move the percent character, since some servers strip it when there's a malformed sequence. |
+ // |
// For instance: new String("http://localhost:8000?x") => new String("http:localhost:8x"). |
- return (c == '\\' || c == '0' || c == '\0' || c == '/' || c == '?' || c >= 127); |
+ return (c == '\\' || c == '0' || c == '\0' || c == '/' || c == '?' || c == '%' || c >= 127); |
} |
static bool isRequiredForInjection(UChar c) |