From e7a98f922b7ae1d12cedf982d0c88663d5817d26 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 f4f11fee3643d9b6e0ecd18c729912dfbd40f026 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