diff --git a/server/models/pages.js b/server/models/pages.js index c452365e..16f5b2f1 100644 --- a/server/models/pages.js +++ b/server/models/pages.js @@ -544,6 +544,8 @@ module.exports = class Page extends Model { await WIKI.models.pages.rebuildTree() // -> Rename in Search Index + const pageContents = await WIKI.models.pages.query().findById(page.id).select('render') + page.safeContent = WIKI.models.pages.cleanHTML(pageContents.render) await WIKI.data.searchEngine.renamed({ ...page, destinationPath: opts.destinationPath,