diff options
author | Andrew Dyukov <adyukov@productengine.com> | 2010-02-22 19:22:43 +0200 |
---|---|---|
committer | Andrew Dyukov <adyukov@productengine.com> | 2010-02-22 19:22:43 +0200 |
commit | 16b284971ebb6ecb41ba65d5fd9da87bc08bcba3 (patch) | |
tree | 8f878d54bb806b4783d24d87f9a456b0cb03bc6c /indra/llui/llurlentry.cpp | |
parent | a7d716c35e57881a016c69752fa5f46dfd314ad9 (diff) |
Fixed normal bug EXT-4964 (Invalid SLURL detection does not detect invalid slurls).
- Added new static method LLSLURL::isValidSLURL() whic uses LLUrlRegistry::isUrl() to validate SLURLs and not just chek prefixes as LLSLURL::isSLURL() does.
- Used it in slurl DnD check in LLViewerWindow.
- LLUrlEntrySLURL regexp was changed not to pass non-valid SLURLS (such as one from the bug description).
--HG--
branch : product-engine
Diffstat (limited to 'indra/llui/llurlentry.cpp')
-rw-r--r-- | indra/llui/llurlentry.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 3c73ae9b0c..20c939874b 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -232,7 +232,7 @@ std::string LLUrlEntryHTTPNoProtocol::getUrl(const std::string &string) const LLUrlEntrySLURL::LLUrlEntrySLURL() { // see http://slurl.com/about.php for details on the SLURL format - mPattern = boost::regex("http://(maps.secondlife.com|slurl.com)/secondlife/\\S+/?(\\d+)?/?(\\d+)?/?(\\d+)?/?\\S*", + mPattern = boost::regex("http://(maps.secondlife.com|slurl.com)/secondlife/[^ /]+(/\\d+){0,3}(/?(\\?title|\\?img|\\?msg)=\\S*)?/?", boost::regex::perl|boost::regex::icase); mMenuName = "menu_url_slurl.xml"; mTooltip = LLTrans::getString("TooltipSLURL"); |