aboutsummaryrefslogtreecommitdiff
path: root/src/common/Utilities/Util.cpp
diff options
context:
space:
mode:
authorTreeston <treeston.mmoc@gmail.com>2018-09-13 00:11:27 +0200
committerShauren <shauren.trinity@gmail.com>2021-10-31 01:39:04 +0200
commite506c80a64571530cf7edd947a5b7dc2f35f9d1d (patch)
treee78a0d480537525c9db0b8ebb9d08f6ce8bdcc6e /src/common/Utilities/Util.cpp
parentfa7e46a4f3f807b0682aba26c7993d142f842648 (diff)
Core/Chat: Unify chat hyperlink parsing (PR #22417)
- Validate most link properties all the time - If enabled, also validate link text (needs locale) - Instead of blocking the entire message, sanitize it - Apply filtering to DND/AFK messages. Closes #22399 (cherry picked from commit f27284594b18000a1c098262728fb19fdc63fc6c)
Diffstat (limited to 'src/common/Utilities/Util.cpp')
-rw-r--r--src/common/Utilities/Util.cpp34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/common/Utilities/Util.cpp b/src/common/Utilities/Util.cpp
index b8550c9a72e..4a4daa33b25 100644
--- a/src/common/Utilities/Util.cpp
+++ b/src/common/Utilities/Util.cpp
@@ -68,40 +68,6 @@ Tokenizer::Tokenizer(const std::string &src, const char sep, uint32 vectorReserv
}
}
-void stripLineInvisibleChars(std::string &str)
-{
- static std::string const invChars = " \t\7\n";
-
- size_t wpos = 0;
-
- bool space = false;
- for (size_t pos = 0; pos < str.size(); ++pos)
- {
- if (invChars.find(str[pos])!=std::string::npos)
- {
- if (!space)
- {
- str[wpos++] = ' ';
- space = true;
- }
- }
- else
- {
- if (wpos!=pos)
- str[wpos++] = str[pos];
- else
- ++wpos;
- space = false;
- }
- }
-
- if (wpos < str.size())
- str.erase(wpos, str.size());
- if (str.find("|TInterface")!=std::string::npos)
- str.clear();
-
-}
-
#if (defined(WIN32) || defined(_WIN32) || defined(__WIN32__))
struct tm* localtime_r(time_t const* time, struct tm *result)
{