2015-04-09 18:41:27 +00:00
|
|
|
#include "utils.h"
|
|
|
|
|
2015-04-12 13:25:16 +00:00
|
|
|
#include <boost/algorithm/string/replace.hpp>
|
2015-04-09 18:41:27 +00:00
|
|
|
|
|
|
|
std::string mstch::html_escape(std::string str) {
|
2015-04-12 13:25:16 +00:00
|
|
|
boost::replace_all(str, "&", "&");
|
|
|
|
boost::replace_all(str, "'", "'");
|
|
|
|
boost::replace_all(str, "\"", """);
|
|
|
|
boost::replace_all(str, "<", "<");
|
|
|
|
boost::replace_all(str, ">", ">");
|
|
|
|
boost::replace_all(str, "/", "/");
|
2015-04-09 18:41:27 +00:00
|
|
|
return str;
|
|
|
|
}
|