From 3a3d57add46da792b80696cfcfcc5bb49bc95108 Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Tue, 31 Jul 2018 20:48:57 -0500 Subject: [PATCH] Fix for corner case screwing up chapter html(attr quotes). Closes #324 --- fanficfare/story.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fanficfare/story.py b/fanficfare/story.py index 643de179..95bd761e 100644 --- a/fanficfare/story.py +++ b/fanficfare/story.py @@ -1083,7 +1083,9 @@ class Story(Configurable): chapter['title'] = chapter['chapter'] retval.append(chapter) else: - retval = self.chapters + # return a copy so chapters inside story can't be changed + # by code outside it. + retval = copy.deepcopy(self.chapters) return retval