StringUtil: Move GetEscapedHtml() into Common namespace

This commit is contained in:
Lioncash 2023-05-16 14:21:19 -04:00
parent 21df3ca572
commit d368c989e7
4 changed files with 8 additions and 8 deletions

View file

@ -86,7 +86,7 @@ TEST(StringUtil, GetEscapedHtml)
static constexpr auto no_escape_needed =
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
"!@#$%^*()-_=+,./?;:[]{}| \\\t\n";
EXPECT_EQ(GetEscapedHtml(no_escape_needed), no_escape_needed);
EXPECT_EQ(GetEscapedHtml("&<>'\""), "&amp;&lt;&gt;&apos;&quot;");
EXPECT_EQ(GetEscapedHtml("&&&"), "&amp;&amp;&amp;");
EXPECT_EQ(Common::GetEscapedHtml(no_escape_needed), no_escape_needed);
EXPECT_EQ(Common::GetEscapedHtml("&<>'\""), "&amp;&lt;&gt;&apos;&quot;");
EXPECT_EQ(Common::GetEscapedHtml("&&&"), "&amp;&amp;&amp;");
}