Commit 1114475d authored by Chris Thompson's avatar Chris Thompson Committed by Commit Bot

Add U+2800 to URL unescape banned list

U+2800 (BRAILLE PATTERN BLANK) isn't in the WSpace or
Formatting/Invisibles sets, but should be treated like a space for
purposes of unescaping.

Bug: 1068531
Change-Id: I151f7c803898bc86d81570a93fbe682daf1cca86
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2147477Reviewed-by: default avatarMatt Menke <mmenke@chromium.org>
Commit-Queue: Christopher Thompson <cthomp@chromium.org>
Cr-Commit-Position: refs/heads/master@{#758627}
parent bb4c5a54
......@@ -240,6 +240,9 @@ bool ShouldUnescapeCodePoint(UnescapeRule::Type rules, uint32_t code_point) {
code_point == 0x202F || // NARROW NO-BREAK SPACE (%E2%80%AF)
code_point == 0x205F || // MEDIUM MATHEMATICAL SPACE (%E2%81%9F)
code_point == 0x3000 || // IDEOGRAPHIC SPACE (%E3%80%80)
// U+2800 is rendered as a space, but is not considered whitespace (see
// crbug.com/1068531).
code_point == 0x2800 || // BRAILLE PATTERN BLANK (%E2%A0%80)
// Default Ignorable ([:Default_Ignorable_Code_Point=Yes:]) and Format
// characters ([:Cf:]) are also banned (see crbug.com/824715).
......
......@@ -203,6 +203,7 @@ TEST(EscapeTest, UnescapeURLComponent) {
"(%E2%80%89)(%E2%80%8A)(%E2%80%A8)(%E2%80%A9)"},
{"(%E2%80%AF)(%E2%81%9F)(%E3%80%80)", UnescapeRule::NORMAL,
"(%E2%80%AF)(%E2%81%9F)(%E3%80%80)"},
{"(%E2%A0%80)", UnescapeRule::NORMAL, "(%E2%A0%80)"},
// Default Ignorable and Formatting characters should not be unescaped.
{"(%E2%81%A5)(%EF%BF%B0)(%EF%BF%B8)", UnescapeRule::NORMAL,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment