move code responsible for replacing content in strings to Replace()
This commit is contained in:
@@ -199,12 +199,9 @@ void EscapeHtml(std::string &s)
|
||||
size_t j = s.find(">")+1;
|
||||
s.replace(i, j-i, "");
|
||||
}
|
||||
for (size_t i = s.find("'"); i != std::string::npos; i = s.find("'"))
|
||||
s.replace(i, static_strlen("'"), "'");
|
||||
for (size_t i = s.find("""); i != std::string::npos; i = s.find("""))
|
||||
s.replace(i, static_strlen("""), "\"");
|
||||
for (size_t i = s.find("&"); i != std::string::npos; i = s.find("&"))
|
||||
s.replace(i, static_strlen("&"), "&");
|
||||
Replace(s, "'", "'");
|
||||
Replace(s, """, "\"");
|
||||
Replace(s, "&", "&");
|
||||
for (size_t i = 0; i < s.length(); ++i)
|
||||
{
|
||||
if (erase)
|
||||
|
||||
Reference in New Issue
Block a user