diff options
| author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-11-16 08:39:41 -0500 |
|---|---|---|
| committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-11-16 08:39:41 -0500 |
| commit | d31596db6a6c5f7ef8c57bfaa42496db4a9b471e (patch) | |
| tree | a107255826e044a4ef23ff6328e8468a39cb5995 /indra/llui/llview.cpp | |
| parent | de487038fc034c470a21e9d6c5bf78e5085ae4a2 (diff) | |
| parent | ecd93e56781498ef73ea2a3d5be0c449179b6a0a (diff) | |
merge
Diffstat (limited to 'indra/llui/llview.cpp')
| -rw-r--r-- | indra/llui/llview.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index fd7406b653..9604e5ce10 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -391,7 +391,27 @@ static void buildPathname(std::ostream& out, const LLView* view) buildPathname(out, view->getParent()); // Build pathname into ostream on the way back from recursion. - out << '/' << view->getName(); + out << '/'; + + // substitute all '/' in name with appropriate code + std::string name = view->getName(); + std::size_t found = name.find('/'); + std::size_t start = 0; + while (found != std::string::npos) + { + std::size_t sub_len = found - start; + if (sub_len > 0) + { + out << name.substr(start, sub_len); + } + out << "%2F"; + start = found + 1; + found = name.find('/', start); + } + if (start < name.size()) + { + out << name.substr(start, name.size() - start); + } } std::string LLView::getPathname() const |
