Line data Source code
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 0 : std::string Utility::sanitize(absl::string_view text) { 11 0 : return absl::StrReplaceAll( 12 0 : text, {{"&", "&"}, {"<", "<"}, {">", ">"}, {"\"", """}, {"'", "'"}}); 13 0 : } 14 : 15 : } // namespace Html 16 : } // namespace Envoy