diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2025-03-21 21:40:38 +0200 |
---|---|---|
committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2025-03-21 22:52:13 +0200 |
commit | ecfe76ac125e484a78f1cba67314f5195d8fdf71 (patch) | |
tree | b1c69ae05fa4b8d912163ed2de67a8310336ea24 | |
parent | bf0767b0d781202064c58ff7c9f44dfeec6959ac (diff) |
vp#404 Improve URL filter
-rw-r--r-- | indra/llui/llurlentry.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 3cc0c05ffa..77f132e9d8 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -221,6 +221,16 @@ bool LLUrlEntryBase::isWikiLinkCorrect(const std::string &labeled_url) const }, L'\u002F'); // Solidus + std::replace_if(wlabel.begin(), + wlabel.end(), + [](const llwchar& chr) + { + return // Not a decomposition, but suficiently similar + (chr == L'\u04BA') // "Cyrillic Capital Letter Shha" + || (chr == L'\u04BB'); // "Cyrillic Small Letter Shha" + }, + L'\u0068'); // "Latin Small Letter H" + std::string label = wstring_to_utf8str(wlabel); if ((label.find(".com") != std::string::npos || label.find("www.") != std::string::npos) |