From 93e2bfe22e5cc782e7d502616dad1fd70d26ae37 Mon Sep 17 00:00:00 2001 From: danielwippermann Date: Mon, 17 Aug 2020 23:48:15 +0200 Subject: fix(std/encoding/toml): Stop TOML parser from detecting numbers in strings. (#7064) Before this patch the TOML parser would incorrect treat the string "base64data0xdamaged" in a declaration as a hex number because the corresponding check triggers even when the "0x" is inside a double quoted string literal as long as it is followed by at least one hex character. --- std/encoding/testdata/string.toml | 1 + 1 file changed, 1 insertion(+) (limited to 'std/encoding/testdata') diff --git a/std/encoding/testdata/string.toml b/std/encoding/testdata/string.toml index 55e3fca34..05f425f11 100644 --- a/std/encoding/testdata/string.toml +++ b/std/encoding/testdata/string.toml @@ -31,3 +31,4 @@ trimmed in raw strings. withApostrophe = "What if it's not?" withSemicolon = "const message = 'hello world';" +withHexNumberLiteral = "Prevent bug from stripping string here ->0xabcdef" -- cgit v1.2.3