1
0
Fork 0
mirror of https://github.com/KingDuckZ/kamokan.git synced 2024-12-27 21:35:41 +00:00

Escape html in non-plaintext responses.

This commit is contained in:
King_DuckZ 2017-04-25 22:08:30 +01:00
parent 8a23dc1add
commit 54e737c171

View file

@ -18,6 +18,7 @@
#include "pastie_response.hpp"
#include "incredis/incredis.hpp"
#include "settings_bag.hpp"
#include "escapist.hpp"
#include <ciso646>
#include <srchilite/sourcehighlight.h>
#include <srchilite/langmap.h>
@ -73,7 +74,8 @@ namespace tawashi {
highlighter.setGenerateEntireDoc(false);
highlighter.setGenerateLineNumbers(true);
const auto lang = m_lang_file;
std::istringstream iss(*pastie);
Escapist houdini;
std::istringstream iss(houdini.escape_html(*pastie));
highlighter.highlight(iss, parStream, lang);
}