diff options
Diffstat (limited to 'indra/llinventory')
-rwxr-xr-x | indra/llinventory/llinventory.cpp | 9 | ||||
-rwxr-xr-x | indra/llinventory/llinventory.h | 1 |
2 files changed, 8 insertions, 2 deletions
diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp index 641532ec29..a529aa3af3 100755 --- a/indra/llinventory/llinventory.cpp +++ b/indra/llinventory/llinventory.cpp @@ -416,12 +416,17 @@ U32 LLInventoryItem::getCRC32() const return crc; } +// static +void LLInventoryItem::correctInventoryDescription(std::string& desc) +{ + LLStringUtil::replaceNonstandardASCII(desc, ' '); + LLStringUtil::replaceChar(desc, '|', ' '); +} void LLInventoryItem::setDescription(const std::string& d) { std::string new_desc(d); - LLStringUtil::replaceNonstandardASCII(new_desc, ' '); - LLStringUtil::replaceChar(new_desc, '|', ' '); + LLInventoryItem::correctInventoryDescription(new_desc); if( new_desc != mDescription ) { mDescription = new_desc; diff --git a/indra/llinventory/llinventory.h b/indra/llinventory/llinventory.h index 17421b3f5e..cc474f3d4c 100755 --- a/indra/llinventory/llinventory.h +++ b/indra/llinventory/llinventory.h @@ -171,6 +171,7 @@ public: //-------------------------------------------------------------------- public: void setAssetUUID(const LLUUID& asset_id); + static void correctInventoryDescription(std::string& name); void setDescription(const std::string& new_desc); void setSaleInfo(const LLSaleInfo& sale_info); void setPermissions(const LLPermissions& perm); |