From 75a9a5f0ca5fb17530018a96f411331ea42308b4 Mon Sep 17 00:00:00 2001 From: Kevin Schaaf Date: Tue, 6 Feb 2018 13:55:09 -0800 Subject: [PATCH] Ensure template instance isn't cached on prototype. Fixes #5096 --- src/lib/template/templatizer.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/template/templatizer.html b/src/lib/template/templatizer.html index 32fb652170..6225d0c07a 100644 --- a/src/lib/template/templatizer.html +++ b/src/lib/template/templatizer.html @@ -198,7 +198,9 @@ }, _customPrepAnnotations: function(archetype, template) { - archetype._template = template; + // Don't store the actual template instance to avoid leaking; just + // store an object referencing its content + archetype._template = {_content: template._content}; var c = template._content; if (!c._notes) { var rootDataHost = archetype._rootDataHost;