From 8c8f9703a0232c4e66c42a45bce53a1694fdc0a3 Mon Sep 17 00:00:00 2001 From: Conduitry Date: Mon, 8 Jan 2018 07:21:13 -0500 Subject: [PATCH 1/7] in stringified Text nodes, only escape &, <, > --- src/utils/stringify.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/utils/stringify.ts b/src/utils/stringify.ts index b5f982eb1d..0fb151c162 100644 --- a/src/utils/stringify.ts +++ b/src/utils/stringify.ts @@ -9,13 +9,11 @@ export function escape(data: string, { onlyEscapeAtSymbol = false } = {}) { } const escaped = { - '"': '"', - "'": '&##39;', '&': '&', '<': '<', - '>': '>' + '>': '>', }; export function escapeHTML(html) { - return String(html).replace(/["'&<>]/g, match => escaped[match]); -} \ No newline at end of file + return String(html).replace(/[&<>]/g, match => escaped[match]); +} From 41744e25fc0ff302ec40c32eb74a0935ec11ea1b Mon Sep 17 00:00:00 2001 From: Conduitry Date: Mon, 8 Jan 2018 07:22:40 -0500 Subject: [PATCH 2/7] parse non-top-level