diff options
| author | Oz Linden <oz@lindenlab.com> | 2016-11-16 09:52:59 -0500 |
|---|---|---|
| committer | Oz Linden <oz@lindenlab.com> | 2016-11-16 09:52:59 -0500 |
| commit | fd2ccb16068dfd21307b17e78e384d8ae19fef12 (patch) | |
| tree | 3e40dcddd3117820008047b81ec218e9cc0ffb7c /indra/llui/llview.cpp | |
| parent | 8baf88a073f30d217e03ee56b4a255121ac98071 (diff) | |
| parent | ecd93e56781498ef73ea2a3d5be0c449179b6a0a (diff) | |
merge changes for 4.1.2-release
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 |
