diff options
author | Martin Reddy <lynx@lindenlab.com> | 2009-10-16 14:04:23 +0000 |
---|---|---|
committer | Martin Reddy <lynx@lindenlab.com> | 2009-10-16 14:04:23 +0000 |
commit | 7aa859b7f4212e0e8177539284eaef6dfad57d94 (patch) | |
tree | 9b445471bee3017f8cfc9b29ac2681b4520c7b75 /indra/llui/llurlregistry.cpp | |
parent | a0ee6fbbdda8aeb4e5cd9733650182866247eb9e (diff) |
EXT-1566: Fixed another case of UTF-8 vs UTF-32 coding error for SLURL
parsing in text editors. Any time we are looking up segment start/end
ranges we should do this on a wide string.
Also added a convenience LLUrlRegistry::hasUrl() method to easily
determine if a string contains a valid SLURL.
Diffstat (limited to 'indra/llui/llurlregistry.cpp')
-rw-r--r-- | indra/llui/llurlregistry.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/indra/llui/llurlregistry.cpp b/indra/llui/llurlregistry.cpp index 8413de0837..249c7320d6 100644 --- a/indra/llui/llurlregistry.cpp +++ b/indra/llui/llurlregistry.cpp @@ -192,3 +192,15 @@ bool LLUrlRegistry::findUrl(const LLWString &text, LLUrlMatch &match, const LLUr } return false; } + +bool LLUrlRegistry::hasUrl(const std::string &text) +{ + LLUrlMatch match; + return findUrl(text, match); +} + +bool LLUrlRegistry::hasUrl(const LLWString &text) +{ + LLUrlMatch match; + return findUrl(text, match); +} |