mirror of
https://github.com/KingDuckZ/kamokan.git
synced 2025-08-03 12:50:02 +00:00
Escape html in non-plaintext responses.
This commit is contained in:
parent
8a23dc1add
commit
54e737c171
1 changed files with 3 additions and 1 deletions
|
@ -18,6 +18,7 @@
|
||||||
#include "pastie_response.hpp"
|
#include "pastie_response.hpp"
|
||||||
#include "incredis/incredis.hpp"
|
#include "incredis/incredis.hpp"
|
||||||
#include "settings_bag.hpp"
|
#include "settings_bag.hpp"
|
||||||
|
#include "escapist.hpp"
|
||||||
#include <ciso646>
|
#include <ciso646>
|
||||||
#include <srchilite/sourcehighlight.h>
|
#include <srchilite/sourcehighlight.h>
|
||||||
#include <srchilite/langmap.h>
|
#include <srchilite/langmap.h>
|
||||||
|
@ -73,7 +74,8 @@ namespace tawashi {
|
||||||
highlighter.setGenerateEntireDoc(false);
|
highlighter.setGenerateEntireDoc(false);
|
||||||
highlighter.setGenerateLineNumbers(true);
|
highlighter.setGenerateLineNumbers(true);
|
||||||
const auto lang = m_lang_file;
|
const auto lang = m_lang_file;
|
||||||
std::istringstream iss(*pastie);
|
Escapist houdini;
|
||||||
|
std::istringstream iss(houdini.escape_html(*pastie));
|
||||||
|
|
||||||
highlighter.highlight(iss, parStream, lang);
|
highlighter.highlight(iss, parStream, lang);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue