Remove unneeded characters from server bookmark key

This commit is contained in:
Benau 2021-07-14 10:38:59 +08:00
parent 63cee25884
commit f490b1039a

View File

@ -243,7 +243,8 @@ void Server::setAddress(const SocketAddress& addr)
// ----------------------------------------------------------------------------
std::string Server::getBookmarkKey() const
{
return StringUtils::xmlEncode(m_name) +
core::stringw name = m_name;
return StringUtils::xmlEncode(name.trim().removeChars(L"\n\r\t")) +
StringUtils::toString(m_server_owner);
} // getBookmarkKey