HandlerFeedGenerator: Use RevisionRenderer
Cette révision appartient à :
Parent
a1042720a7
révision
2b1c3c71b7
@ -1,5 +1,6 @@
|
||||
#include "handlerfeedgenerator.h"
|
||||
#include "../parser.h"
|
||||
#include "../revisionrenderer.h"
|
||||
std::vector<HandlerFeedGenerator::EntryRevisionPair> HandlerFeedGenerator::fetchEntries(
|
||||
std::vector<std::string> categories)
|
||||
{
|
||||
@ -67,6 +68,8 @@ std::string HandlerFeedGenerator::generateAtom(const std::vector<HandlerFeedGene
|
||||
subtitle = "All pages";
|
||||
}
|
||||
|
||||
RevisionRenderer revisionRenderer { *this->templ, *this->database, *this->urlProvider };
|
||||
|
||||
for(const EntryRevisionPair &entry : entries)
|
||||
{
|
||||
const Page &page = entry.first;
|
||||
@ -87,8 +90,7 @@ std::string HandlerFeedGenerator::generateAtom(const std::vector<HandlerFeedGene
|
||||
atomentry.setVar("entryid", utils::html_xss(entryurl));
|
||||
atomentry.setVar("entrypublished", entryPublished);
|
||||
atomentry.setVar("entryupdated", entryUpdated);
|
||||
Parser parser;
|
||||
atomentry.setVar("entrycontent", utils::html_xss(parser.parse(*pageDao, *this->urlProvider, current.content)));
|
||||
atomentry.setVar("entrycontent", utils::html_xss(revisionRenderer.renderContent(current, page.title)));
|
||||
stream << atomentry.render();
|
||||
}
|
||||
stream << atomfooter;
|
||||
|
Chargement…
Référencer dans un nouveau ticket
Block a user