1
#include "source/common/html/utility.h"
2

            
3
#include <string>
4

            
5
#include "absl/strings/str_replace.h"
6

            
7
namespace Envoy {
8
namespace Html {
9

            
10
860
std::string Utility::sanitize(absl::string_view text) {
11
860
  return absl::StrReplaceAll(
12
860
      text, {{"&", "&amp;"}, {"<", "&lt;"}, {">", "&gt;"}, {"\"", "&quot;"}, {"'", "&#39;"}});
13
860
}
14

            
15
} // namespace Html
16
} // namespace Envoy