View Bug Report
Usernames with some special characters are not unescaped
Bug #: 3333
File: LibMultiAccountSets
Date: 02/23/21 12:09 PM
By: Shredder121
Status: Unconfirmed
I've got a friend of mine who has a quote character in his name (Zao'Vien), and I keep adjusting his name in his LMAS files he sends me. This is only a workaround for consumers of his file, since in HIS lmas he'll always be Zao&​#39;Vien.

Result of /script d(GetDisplayName())

When I distribute a combined LMAS file and he downloads it, he'll "occur twice" in the tooltip, once incorrectly at the start as current account (but correct for him, as "Zao&​#39;Vien") and once correctly(for us, as "Zao'Vien").
Now I know *why* the escaping happens, because pretty much the entire UI is XML, but LMAS takes the account name as-is, so I was wondering if it's possible to do some preprocessing.
I found an article on xml parsing (LuaXml), and since we don't need to parse an entire document, only a small subset of the values (only character data), we could only do the necessary preprocessing, as is seen in XmlParser:FromXmlString:


Code:
Lua Code:
  1. value = string.gsub(value, "&#([0-9]+)%;",
  2.           function(h)
  3.               return string.char(tonumber(h,10))
  4.           end);

RSS 2.0 Feed for Bug CommentsNotes Sort Options
By: code65536 - 02/24/21 02:16 PM
This is an upstream bug. GetDisplayName is not supposed to escape characters, and has not done so in the past. This bug breaks a lot of things (including ZOS's own saved variable functions), not just LMAS. In any case, people should just use alphanumeric usernames anyway...
By: Shredder121 - 03/01/21 09:47 AM
Oh okay, thanks for the reply!