diff --git a/indra/newview/ao.cpp b/indra/newview/ao.cpp index 5907b27683..91cf8b8f30 100644 --- a/indra/newview/ao.cpp +++ b/indra/newview/ao.cpp @@ -342,9 +342,13 @@ void FloaterAO::onRenameSet() std::string name=mSetSelector->getSimple(); LLStringUtil::trim(name); + LLUIString new_set_name=name; + if(!name.empty()) { - if(name.find_first_of(":|")==std::string::npos) + if( + LLTextValidate::validateASCIIPrintableNoPipe(new_set_name.getWString()) && // only allow ASCII + name.find_first_of(":|")==std::string::npos) // don't allow : or | { if(AOEngine::instance().renameSet(mSelectedSet,name)) { @@ -356,7 +360,7 @@ void FloaterAO::onRenameSet() { LLSD args; args["AO_SET_NAME"]=name; - LLNotificationsUtil::add("RenameAOCantContainColon",args); + LLNotificationsUtil::add("RenameAOMustBeASCII",args); } } mSetSelector->setSimple(mSelectedSet->getName()); @@ -451,7 +455,9 @@ BOOL FloaterAO::newSetCallback(const LLSD& notification,const LLSD& response) { return FALSE; } - else if(!LLTextValidate::validateASCIIPrintableNoPipe(new_set_name.getWString())) + else if( + !LLTextValidate::validateASCIIPrintableNoPipe(new_set_name.getWString()) || // only allow ASCII + newSetName.find_first_of(":|")!=std::string::npos) // don't allow : or | { LLSD args; args["AO_SET_NAME"]=newSetName; diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 319925fe13..4db9087533 100755 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -9218,10 +9218,10 @@ The name may only contain ASCII characters, excluding ":" and "|". -Could not rename new AO set to "[AO_SET_NAME]". -The name may not contain ":" or "|" characters. +Could not rename AO set "[AO_SET_NAME]". +The name may only contain ASCII characters, excluding ":" and "|".