From a28973c2aae32293c92d125fefcecb1675d84c13 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 20 Sep 2018 15:28:28 +1000 Subject: [PATCH] when rebuilding field cache make sure we don't discard filenames stripHTMLMedia() already used in notes.py --- anki/collection.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/anki/collection.py b/anki/collection.py index c8cef90cb..5b80b398b 100644 --- a/anki/collection.py +++ b/anki/collection.py @@ -14,7 +14,7 @@ import traceback from anki.lang import _, ngettext from anki.utils import ids2str, fieldChecksum, stripHTML, \ - intTime, splitFields, joinFields, maxID, json, devMode + intTime, splitFields, joinFields, maxID, json, devMode, stripHTMLMedia from anki.hooks import runFilter, runHook from anki.models import ModelManager from anki.media import MediaManager @@ -523,7 +523,7 @@ where c.nid = n.id and c.id in %s group by nid""" % ids2str(cids)): if not model: # note points to invalid model continue - r.append((stripHTML(fields[self.models.sortIdx(model)]), + r.append((stripHTMLMedia(fields[self.models.sortIdx(model)]), fieldChecksum(fields[0]), nid)) # apply, relying on calling code to bump usn+mod